Question DSA-ARR-0030
EasyHow many non-empty subarrays does an array of n elements have?
- A.
n
- B.
n²
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Arrays question
How many non-empty subarrays does an array of n elements have?
n
n²
Sign up free to see the answer and a step-by-step explanation.
n(n + 1)/2
2ⁿ