1.

Are the below statements true about skiplists?In a sorted set of elements skip lists can implement the below operationsi.given a element find closest element to the given value in the sorted set in O(logn)ii.find the number of elements in the set whose values fall a given range in O(logn)(a) true(b) falseThis is a very interesting question from Skip List topic in section Types of Lists of Data Structures & Algorithms IThis question was addressed to me during a job interview.

Answer»

Right option is (a) true

The explanation is: To ACHIEVE above OPERATIONS AUGMENT with few ADDITIONAL stuff like partial counts.



Discussion

No Comment Found

Related InterviewSolutions