Sunday, February 6, 2011

Skip lists

Given an array of integers, each element represents the max number of jumps can make forward. What is the minimum number of element selections to reach the end of the array.

PS: In IR these are the skip lists, can you devise an quadratic algo? how about a linear one?

No comments:

Post a Comment