Google Interview Report
- -1of 5 votes
AnswersFollow-up to above question:
- / July 31, 2016 in United States
Can you augment a BST to return the number of elements with node values in a given range?
If not, what other data structure would work?| Report Duplicate | Flag | PURGE
Google Software Engineer Data Structures - -1of 3 votes
AnswersWrite a function that takes as input an array of integers A, and two integers low and high.
- / July 31, 2016 in United States
Your function has to output pairs of indices: {(i,j), ...}
Where each pair of indices denotes that the subarray of A[i...j] has a sum in the range low <= sum <= high.
Apparently there are algorithms better than O(N^2).| Report Duplicate | Flag | PURGE
Google Software Engineer
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.