What are the fundamental operations of a linked list

Assignment Help Data Structure & Algorithms
Reference no: EM132125398

Question: Questions 1 - 3 are related to "singly linked list". You must type your answer.

1. What are the fundamental operations of a linked list?

2. What is the main advantage of a linked list over an array?

3. What is the time complexity of deleting a node from a linked listed? Is it faster than deleting a node from an array? Why?

4. Test program p2-1 linkedListClass, and make sure that you understand each operation in the program.

5. Write a testing class that is similar to linkedListApplication class defined in p2-1 to test program p2-2 DoubleLinkedList. Make sure that you understand each operation in the program.

6. (Programming) Use p2-1 linkedListClass as a reference, add the following operations in the class LinkedList;

Find the average data values of the linked list.

Find the item with largest key, and then delete the node.

Test ALL operations in the Main method. (Also display the average of the data values of the linked list, the largest key, the linked list before and after deleting the node with the largest key;

7. (Programming) Modify p2-1 SingleLinedList programs so that it handles employee objects. Make your program menu-driven. The class employee is the same as in

Assignment 2:

import java.util.Scanner;

public class employee

{

public int id;

public String name;

public double salary;

public void Input()

{

System.out.println("Enter name: ");

name = new Scanner(System.in).nextLine();

System.out.println("Enter ID: ");

id = Integer.parseInt(new Scanner(System.in).nextLine());

System.out.println("Enter Salary: ");

salary = Double.parseDouble(new Scanner(System.in).nextLine());

}

public void Output()

{

System.out.printf("Name: %1$s, ID: %2$s, Grade: %3$s ", name, id, salary);

}

public String toString()

{

return String.format("[Name: {0}, ID: {1}, Grade: {2}]", name, id, salary);

}

}

Requirement for assignment reports

1. The cover page must be attached.

2. For each programming question, the submission must contain the program itself, proper description of the program, and running page (screen shot) which shows that the program works for all cases.

3. Add proper comments lines for non-trivial so that the instructors can read and understand the program.

4. Submit to e-learn by mid-night on the due date

Reference no: EM132125398

Questions Cloud

Important values-principles you think need to be considered : What are the important values/principles you think need to be considered, including at least one conflict between values (consider using a list.)
Create a new application that will allow for customers : You decide that your current application is not up to date anymore and is not serving your company like it should. To gain more speed and agility you decide.
How is human resource management important : How is human resource management important? Describe the components of Job descriptions.
Clearly state what assumptions would be required : Defend your choice and clearly state what assumptions would be required to transfer or adapt IKEA's strategy in the chosen company(ies) or industry(ies)
What are the fundamental operations of a linked list : What are the fundamental operations of a linked list? What is the main advantage of a linked list over an array?
Private businesses have great interest inquality primary : Private businesses have a great interest inquality primary and secondaryeducation becausetoday's students are tomorrow's employees.
Potential for negotiations in next round of contract talks : What impact might this have on the potential for negotiations in the next round of contract talks?
Test bivariate relationships between casual serum glucose : PUN105 Assessment - Analytical Report - Describe and test the bivariate relationships between casual serum glucose at the baseline examination
Evaluate and discuss the types of evaluations : Evaluate and discuss the types of evaluations shown in Figures 11-1(Graphic Rating Scale, 11-3 (Objective Method), and 11-6 (360 Evaluation)

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Write down an all-pairs algorithm that is given a list of

question 1.algorithms a and b perform the same task. on input of size n algorithm a executes 0.5n2 steps and algorithm

  Describe a fair coin algorithm to returns either 0 or 1

Describe a FAIRCOIN algorithm that returns either 0 or 1 with equal probability, using ONEINTHREE as your only source of randomness.

  Define a federated database

Define a federated database and discuss why are federated databases becoming increasingly common? Provide examples of databases in your current or previous work environment

  Write code to implement the expression

Write code to implement the expression: A= (B+C) * (D+E) on 3-, 2-, 1- and 0- address machines. In accordance with programming language practice, computing the expression should not change the values of its operands. Show all instructions.

  Object oriented approach versus the relational database

Supporters of object oriented databases list many benefits for using the object oriented approach versus the relational one.

  Use of sequential or relational file

Assume you wish to keep a record of everything you have in your house. You could use a sequential data document to keep track of common items such as 'cloths'.

  Computing entropy of plaintext message

Compute the entropy of the plaintext message?

  What is the machine run time in second for sorting array

Write computer program to implement this algorithm and demonstrate the results and what is the machine run time in second for sorting array A

  Write algorithm find intersection of two singly-linked list

Write an algorithm (pseudocode) to find the intersection of two singly-linked lists. Assume that the data in each list are in nondecreasing order.

  Creating financial tracking program

Acme Inc. is making next generation financial tracking program, and Alice has been provided the task of writing encryption component.

  Create a sequential search adt

Create a sequential search ADT. The array to be searched is to be maintained by the application program in its own area. The target may be any type and may be included in a structure.

  Describe and implement fft algorithm cooley-tukey

Describe and implement in C++ FFT algorithm "Cooley-Tukey". Also, implement naive DFT and compare naive DFT with FFT using: a sample of the signal x(t) = t

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