PRACTICE / UNDERSTAND / REPEAT

Data Structures & Algorithms: Arrays & prefix sums

Practice arrays & prefix sums with self-contained questions. Check your answer, then use the explanation to understand the reasoning.

20 questionsAnswers explainedFree · no login
Question 1 of 20
Arrays & prefix sums · MCQQuestion link ↗

An array is [1, 2, 3]. What is the sum of its elements?

Choose one answer
Answer & explanation

Answer: 6

Add all three values. A prefix-sum representation would store this as the final prefix.