Question: Implement a skip list class. Save it in file skipList.java. Use random-ization to promote nodes to higher levels. Implement the following methods: skipInsert(k,v) to insert
Implement a skip list class. Save it in file skipList.java. Use random-ization to promote nodes to higher levels. Implement the following methods: skipInsert(k,v) to insert in a skip list entry with key k and value v; skipRemove(k) to remove position corresponding to key k from all levels in the skipList; skipSearch(k) to search for key k in the skip list (returns position corresponding to key k in the bottom list,or null if k is not found). The java file should include the main method that creates a skip list from the hardcoded sequence of 10 integers and prints out the resulting list tostdout.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
