Create an integer array withsome random 2-digit numbers


1. Create an integer array withsome random 2-digit numbers. Move these numbers into a singly linked list with the same order. Display the contents of the array and linked list, respectively.

2. Add an operation for finding the item with largest key in the class LinkedList, and then delete the node. Test it in the Main method.
(display the largestkey, the linked list before and after removing the node with the largestkey.

3. Write a program for linked list of Employee records (employee's ID, empID, is used as key). The program must contain the following operations:

a. Search for an employee (given anemployee empID), and return the whole record when it is found.

b. Insert a node (given a new employee record and the empID(preKey) of anemployeerecord who is in front of the new employee in the list.

c. Delete a node(given anemployee empID)

d. Append a node (given a new employee record)

e. Remove a node(return the whole removed employeerecord)

In the Main method, test your program as follows:

• Create an empty linked list.

• Install 5 employee records into the list, and print the whole list from the header.

• Search anemployee record by anemployee empID, and print the employee record if the employee is found, or print a message when the employee does not exist.

• Insert an employeerecord to the linked list and print the list to confirm that the new employee record is inserted.

• Delete anemployee record and print the list to confirm that the record is deleted.

• Append anemployee record (given anemployee record), and print the list to confirm that the record is appended to the head.

• Remove anemployee record, and print the list to confirm that the record is removed from the head.

Solution Preview :

Prepared by a verified Expert
Data Structure & Algorithms: Create an integer array withsome random 2-digit numbers
Reference No:- TGS01277367

Now Priced at $60 (50% Discount)

Recommended (95%)

Rated (4.7/5)