CSc 21200  Homework 3 solution

$29.99

Original Work ?

Download Details:

  • Name: HW3-1.zip
  • Type: zip
  • Size: 59.40 KB

Category: You will Instantly receive a download link upon Payment||Click Original Work Button for Custom work

Description

5/5 - (1 vote)

Name your implementation file as LastName(3 to 5 letters)_FirstNameInitial_HW3.cpp
Note: You can only use iostream, cassert, cctype, cmath, cstdio, and cstdlib.
1. Create a singly linked list. Create class/functions that:
a. Insert a Node at the head
b. Insert a Node at the tail
c. Insert a Node at position i
d. Insert data at the head
e. Insert data at the tail
f. Insert data at position i
g. Check if there is a cycle
h. Check if the list is empty
i. Check if a position is valid
j. Get the length of the list
k. Get the Node at position i, i.e. locate
l. Get the Node with target data, i.e. search
m. Remove the Node at the head
n. Remove the Node at the tail
o. Remove the Node at position i
p. Remove all the Node
q. Remove all the Node from position i to position j
r. Remove all the Node from the head to position j
s. Remove all the Node from position i to the tail
t. Reverse the whole list without making another list
u. Print the whole list
v. Swap two Node at position i and i+1, change the link and not the data
w. Swap two Node at position i and j, change the link and not the data