Thursday, September 23, 2010

Array pre processing

Given an integer array A[], what preprocessing you need to do so that when given i and j such that i <= j, you can tell in O(1) time the number of elements in the array having values between and including i and j.

No comments:

Post a Comment