← Morgan Stanley questions
CodingEasy

Range sum query in an array

Filed under Morgan Stanley

Given an integer array nums, handle multiple queries of the following type: Calculate the sum of the elements of nums between indices left and right inclusive where left <= right.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Morgan Stanley questions

Collected from public candidate posts and coding forums. Updated Nov 2026.