Subject Code : COMP2010
Assignment Task

 


Objective: To gain experience in programming with tree data structures; to adapt basic tree and searching algorithms to achieve the best performance possible within the constraints of the given data structures.

 

Insertion — inserting a node in a linked list is similar to insertion in a sorted linked list. First the correct place for insertion must be found, but there is an added complication to take care of, namely that a newly inserted node might have to be inserted on several levels. The decision for whether to insert on several levels in practice is made by a random choice. In the steps below we indicate when that happens. However in this assignment the insertion algorithm will include a parameter to indicate on how many levels the new node must appear. A summary of insertion is as follows:
1. Search for the correct place to insert.
2. If the item already is in the skip list, then do not insert.
3. If the item to be inserted does not appear, choose a level and insert the item in the correct place on the chosen level and every level below it ‡. The nodes with the same data value must be connected between levels (see below for implementation details).
‡ Note that sometimes a completely new level must be created. If that happens then it must be numbered as one more than the (former) top level number of the skip list.
Depending on the order of insertion, and the “random” choice to determine which levels the new item should appear, we can get different data structures. The following is an example of what can happen. We discuss implementation issue below. but for now we depict a node with two data fields. and two link fields. We indicate by horizontal arrows the pointers to the next node on the same level and vertical arrows to (down) pointers for access to the nodes on the level below. When a line has no arrow head it indicates that the pointer is set to null. The node itself is split in two, with the value in the upper potion the data value, and the value in the lower portion the level value. Nodes on the bottom level have level number 0.


Your Task
In this assignment your task is to implement a number of methods defined in the class SLNode and SkipList. There is also an Assignment Quiz containing questions to help you with your understanding of Skip Lists. The specification for each method is given in the Assignment Bundle. The credit awarded for program implementation for this assignment will be entirely on the basis of automarking relative to a set of JUnit tests. A sample of these tests are provided in the source files as a benchmark. Please note that the sample tests assume a specifically created input Skip List. When your programs are tested by the auto-tester a different input Skip List will be used. You are strongly advised to experiment with different Skip Lists to ensure that your programs are correct. This will also help you understand the specifications. The following describes what you must implement depending on the level of attainment you are aiming for. All students must also complete the Quiz.

 

 

This COMP2010 - Computer Science Assignment has been solved by our Computer Science experts at UniLearnO. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Eureka! You've stumped our genius minds (for now)! This exciting new question has our experts buzzing with curiosity. We can't wait to craft a fresh solution just for you!

  • Uploaded By : Brett
  • Posted on : April 06th, 2019

Whatsapp Tap to ChatGet instant assistance