How to expand class linkedlisttype

Assignment Help Computer Engineering
Reference no: EM132432

Question

Expand class linkedListType by adding following operations-

1- inscribe a function noDuplicates that insert an item except before inserting the item it checks whether the item is already in listing. If the item to be inserted is already in the list, the function outputs an appropriate error message.

2- Write down a function that returns the info of the kth element of the linked list. If no such factor exists, output an appropriate message.

Note down a program to test your functions.


Sample Input or output

Enter the size of the List: 6

Enter a number to be inserted: 5
Enter a number to be inserted: 7
Enter a number to be inserted: 5

Item you try to insert is already in the list.

Enter a number to be inserted: 9
Enter a number to be inserted: 1
Enter a number to be inserted: 7

Item you try to insert is already in the list.

Enter a number to be inserted: 10
Enter a number to be inserted: 2

The Content of the list is:
5 7 9 1 10 2

Enter an index to return its value: 3
The value of index 3 is : 1

 

Reference no: EM132432

Questions Cloud

Prepare a memorandum that outlines the tax consequences : Prepare a memorandum that outlines the tax consequences of each of the three alternative acquisitions
Evaluate approximate activity cost driver rates : Evaluate approximate Activity Cost Driver Rates (ACDR) for the drivers you have chosen.
Write program to calculate pay of different types of employe : Write program to calculate pay of different types of employe
Evaluate total amount for intangible assets : Evaluate the total amount to be reported by Langrova for intangible assets
How to expand class linkedlisttype : Expand class linkedListType. Write down a function that returns the info of the kth element of the linked list. If no such factor exists, output an appropriate message.
How to produce a work breakdown structure : How to produce a Work Breakdown Structure. Ensure main WBS tasks headings are the 5 PMBOK® process areas.
What are pros and cons of society''s increasing reliance data : What are pros and cons of society's increasing reliance data
What variety of cable will work to make an association : What variety of cable will work to make an association
Describe what java environment contain to pass an arraylist : Describe what Java environment contain to pass an ArrayList

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write a program that reads in a list of positive integers

Write a program that reads in a list of positive integers. Write down a program which asks user to respond to a question by entering either 1 for yes or 2 for no.

  How to store ten floating-point values into vector

How to store ten floating-point values into vector. Write down a program that declares a vector of ten floating-point values

  Speed routing protocol

Following question is related to SPEED routing protocol-Multiple speeds are computed in MAC layer. The forwarder with highest speed is selected on MAC layer feedback. This selection could not produce a shortest path.

  How to compare and evaluate speeds of dsl and cable modem

How to compare and evaluate speeds of DSL and cable modem Make a diagram of the DSL and Cable Modem connections to your ISP, cable organization, and telecom to your home router using Visio or its open source another software.

  What profit do you see with partitioned view

Explain your idea for a database along with your thoughts for a partitioned view. 1. How will you use this partitioned view?

  Explain the averaging algorithm

Explain the averaging algorithm

  How many tasks real-time application contain

How many tasks real-time application contain In this particular real-time application, there are many tasks; each runs exact same code except with different data each time.

  Mathematics in computing

Write the selection sort algorithm

  The ways to depict constraint graph

The ways to depict constraint graph? illustrate how splitting a domain can be used to solve this problem.

  Design a dedicated datapath

Design a dedicated datapath

  Describe what java environment contain to pass an arraylist

Describe what Java environment contain to pass an ArrayList

  Type of data standard

What type of data standard are we dealing with in each scenario (metadata, spatial or attribute)? You work for Town of Ancaster prior to an amalgamation of New City of Hamilton. Your main responsibility was to retain Town's single line road network f..

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