Create an integer array withsome random two-digit numbers

Assignment Help Data Structure & Algorithms
Reference no: EM13970942

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.

Reference no: EM13970942

Questions Cloud

Discount rate-what is the present value : Assuming a discount rate of 8%, what is the present value of $50 received at the end of each year for 20 years? And what is the formula if the $50 were to be received at the beginning of the year?
What are critical common components to all religions : What are critical common components to all religions/beliefs in regards to healing, such as prayer, meditation, belief, etc.? Explain. What is important to patients of the faiths when cared for by health care providers whose spiritual beliefs dif..
Capital budgeting analysis for proposed project : Using a spreadsheet, conduct a capital budgeting analysis for the proposed project assuming that Blades does not renew the agreement with Entertainment Products. Should Blades establish a subsidiary in Thailand under these conditions? Should Blade..
Calculate its return on invested capital : Duval Manufacturing recently reported the following information: Net income $ 640,000 ROA 8% Interest expense $ 192,000 Accounts payable and accruals $950,000 Duval’s tax rate is 35%. Duval finances with only debt and common equity, so it has no pref..
Create an integer array withsome random two-digit numbers : 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.
How much are the fixed costs of producing the course packs : Southwest U's campus book store sells course packs for $16 each. The variable cost per pack is $10, and at current annual sales of 51,000 packs, the store earns $75,000 before taxes on course packs. How much are the fixed costs of producing the cours..
What is the role of a pilot project in information systems : What is the role of a pilot project in information systems analysis? Why do you think the Petrie's team decided to do a pilot project before rolling out the customer loyalty system for everyone
Finances with only debt and common equity : Duval Manufacturing recently reported the following information: Net income $ 640,000 ROA 8% Interest expense $ 192,000 Accounts payable and accruals $950,000 Duval’s tax rate is 35%. Duval finances with only debt and common equity, so it has no pref..
Pro forma financial statements of parent : Write a memorandum to Ms. Franklin summarizing the results of your analysis. including a summary of the financial ratios you computed and your recommendation. Attach copies of both sets of pro forma financial statements of Parent, Inc. and the pro..

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Store the grades that you read in an arraylist

We expect the file to contain grades represented by integer values, one per line. If you encounter a value that is not an integer, you should throw an exception, print a message to the console, skip that value, and continue processing.

  Identify the dfd elements

Compare the guidelines for preparing flowcharts and DFDs. What general design principles and limitations are common to both documentation techniques?

  Design a complete algorithm or draw a flowchart

Design a complete algorithm or draw a flowchart that determines the sales tax on purchases under $1.00 for a state with a 7% sales tax rate. Display the sales tax amount if the number of cents entered was 99 or less; otherwise, display an error me..

  Describe algorithm that finds maximum feasible flow in graph

Describe an algorithm that finds a maximum feasible flow in G. Denote by MF(|V|, |E|) the worst-case running time of an ordinary maximum flow algorithm.

  Convert the following expression in postfix

Convert the following expression in postfix (reverse Polish notation). Remember the rules of precedence for arithmetic operators. To get full credit, you need to show all work done. i.e. sample snapshot of the stack

  Design a version of mergesort that uses the auxiliary array

Given a list L[0:n - 1], one way of maintaining a sorted order of L is to use an auxiliary array Link[0:n - 1].

  1 n vehicles occupy squares 1 1 through n 1 ie the bottom

1. n vehicles occupy squares 1 1 through n 1 i.e. the bottom row of an n times n grid. the vehicles must be moved to

  Discuss deleting items from binary search trees

If the item to be deleted is contained in a node with one child, the reference in the parent node is set to reference the child node and the node containing the data item is deleted. This causes the child node to take the place of the deleted node..

  Draw the recursive process of mergesort and quicksort

Draw the recursive process of Mergesort and Quicksort for sorting the sequence {5, 1, 2, 9, 7}. You will get a recursion tree for Mergesort and Quicksort respectively. What are their depths?

  Write algorithm to prompt for and accept four numbers

Write the algorithm which will prompt for and accept four numbers, sort them into ascending sequence and display them to screen. Your algorithm is to include module called Order _two_numbers.

  In this programming assignment you will implement an open

in this programming assignment you will implement an open hash table and compare the performance of four hash functions

  How can we distinguish threads from real children links

How can we distinguish threads from real children links - Design the routines to perform insertion and deletion into a tree threaded in the manner described above.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd