Using the following instruction below, write a header class for orderedLinkedList with a function of search,insert, insertFirst, insertLast and deleteNode. Use the library to write a c++ program to show an operation on an ordered linked list. - include the orderedLinkedList.h library in the codes - Create main function and include your information details - initialize a list1 and list2 as orderedLinkedList type - Declare a variable num as integer data type - Print out an instruction for user to input a numbers ending with -1 - Get a numbers from user input - Use a while loop to insert the numbers into list1 ending with -1 - Assign the list2 to list1 - Print out the current elements in List 1 and 2 - Get user input for the number to be deleted - Delete the number requested by user in list2 - Print out the elements in the list1 and list2 after delete operation
Using the following instruction below, write a header class for orderedLinkedList with a function of search,insert, insertFirst, insertLast and deleteNode. Use the library to write a c++ program to show an operation on an ordered linked list.
- include the orderedLinkedList.h library in the codes
- Create main function and include your information details
- initialize a list1 and list2 as orderedLinkedList type
- Declare a variable num as integer data type
- Print out an instruction for user to input a numbers ending with -1
- Get a numbers from user input
- Use a while loop to insert the numbers into list1 ending with -1
- Assign the list2 to list1
- Print out the current elements in List 1 and 2
- Get user input for the number to be deleted
- Delete the number requested by user in list2
- Print out the elements in the list1 and list2 after delete operation
Step by step
Solved in 3 steps with 1 images