CS212: Assignment 2: Linked Lists

$30.00

Category: You will Instantly receive a download link for .zip solution file upon Payment

Description

5/5 - (4 votes)

CLO-2: Demonstrate the ability to create and use classes within the C++ programming language
CLO-5: Apply the OOP concepts to solve complex problems independently
Instructions:
Assignment must be submitted in printed form as well as in soft form (on LMS). Plagiarism in assignment will lead to
zero marks. Clearly mention your name, section & registration number on the assignment. To get good marks you must
attempt assignment yourself, use good programming practices & explain your solution through comments.
______________________________________________________________________________
Tasks:
1. Analyze conceptually the requirements for a singly linked list in C++ and create a class which implements all the
required functions. Write code for insertion and deletion of a node in a singly linked list (at start, middle and end
positions).
2. Write a SortedINSERT() function which given a sorted list in ascending order, and a single node, inserts the node
into the correct sorted position in the list.
3. Create a method that takes two linked lists as arguments and appends second list to the first one.
4. Create SORT() method that sorts a given list in ascending order.
5. Create SPLIT() method that splits a given list into two parts i.e. front part and back part. For cases where no. of
elements is odd, the second part should hold the extra element.