Description
Objective:
– Use fundamental data structures such as stacks, queues, linked-lists, and trees to represent data and meet application requirements.
– Demonstrate knowledge of recursion by describing common applications and by effectively using it to solve problems.
– Use appropriate algorithms to solve common computing problems.
Problem:
In this problem, you will rearrange the nodes in a linked-list from the smallest integer to the largest integer (i.e., the head node should hold the smallest integer in the list). Implement a method called listSort() that receives a value head that points to the first node of the unsorted linked-list. The method then returns a value head which is a reference to the sorted list. The method signature should use the following specification:
IntNode listSort(IntNode head)
For simplicity, your method will use the selection sort algorithm to sort the linked-list.
NOTE:
1. Implement the linked-list application as demonstrated in the lecture video. Therefore, you should submit a complete, stand-alone, runnable program.
2. Your method should be implemented such that it moves an entire node from the unsorted linked-list to the sorted linked-list. Therefore, the unsorted list should reduce in size as the sorted list increases in size. This method should NOT create new nodes.
3. At the end of the operations, the sorted list should have the same number of nodes as the unsorted list initially had.
Felicia Schoenthal –
Great quality solution, Done way before time
Reyes Flores –
Awesome work as usual!!
Ed Selee –
I highly recommend this website. It is definitely the best.
Guy Booker –
I was very happy with everything in my assignment that I have reviewed. I have got great price and professional work
Mike Snyder –
I am pleased for the assistance to get a answer to my questions. The service is prompt and provides good value to me.