if you’re a fresher, chances are high that the first language you’ll learn to program is in C. I personally consider C to be the mother of all modern day programming languages, mainly because C++ is more or less completely based on C, and Python(yes, The Python programming language too!) is written in C, as well as some of its widely used packages.
Range Sum is a popular problem in competitive programming and technical interviews. Range Sum problem asks sum of the elements in a range in a given array. Naïve approach requires O(N*Q) time which can be improved to be O(N+Q) using Prefix Sum approach. N is the size of the array and Q is the number of queries.