janemayers
March 3rd, 2008, 01:47 PM
I guess it won't help me now, but I'll appreciate your thoughts anyway.
You are given an array with n actors, each has a weight and an age.
You should build a data structure that has only one function: for any two real numbers i,j you should be able to return the youngest actor in this range of heights (if exists).
You can take as much time as you want (finite...) to build the data structure and you may assume that no changes will be made after initialization.
Any ideas?
Thanks.
You are given an array with n actors, each has a weight and an age.
You should build a data structure that has only one function: for any two real numbers i,j you should be able to return the youngest actor in this range of heights (if exists).
You can take as much time as you want (finite...) to build the data structure and you may assume that no changes will be made after initialization.
Any ideas?
Thanks.