Describe the behaviour of the delete operation

Assignment Help Computer Engineering
Reference no: EM1328739

(a) Consider the following axioms from the Unsorted List ADT:
Delete(Create, i1) = Create
Delete(Make(L1, i2), i1) =
IF i1 = i2 THEN
L1
ELSE
Make(Delete(L1, i1), i2)
END IF
Briefly describe the behaviour of the Delete operation as defined by these axioms.

What changes would you make to the above axioms in order to carry out the other two types of deletion discussed in class?

(b) The interface file for a linked list implementation of the Unsorted List ADT offers the
following methods:
public void make(Object item);
public void delete(Object item);
public ListReferenceBased concat(ListReferenceBased list2);
public ListReferenceBased tail();
public boolean isEmpty();
public boolean isIn(Object item);
public Object head();
public int length();

Write java code for a method that finds the smallest integer in an unsorted list of integers.
This method is to appear in a client program, thus must use methods from the above interface file. You do not need to handle exceptions. Assume the following skeleton:
public static Integer findSmallest(ListReferenceBased list) {
}
Provide appropriate PRE and POST conditions for your method.

(c) Describe and illustrate how items are normally added and removed from an efficient implementation of the queue ADT, as defined in class, which is implemented using an array. What problems may arise in testing for an empty or a full queue and how might these be overcome?

Give two applications of a queue in computing.

Reference no: EM1328739

Questions Cloud

Relationship b/w federal and state court systems : Discuss the relationship between the federal and state court systems as well as what determines the cases that will be heard and in which courts.
Explain management plan - the little gym : Explain Management Plan - The Little Gym and some examples of globalizations considerations
Traditional principles that suited organizational values : It dealt with traditional principles that suited the company's organizational values.
Present value-academic response : Find out the present value of $1 million in 30 years (future value) by using an interest rate of 5%?
Describe the behaviour of the delete operation : What changes will you make to the above axioms in order to carry out the other two types of deletion discussed in class.
Us supreme court cases : Discuss the kinds of cases the U.S. Supreme Court hears as well as what cases are presented to them. Additionally, identify those persons who decide which cases the Supreme Court will decide.
Importance of managing systems : Deming's Theory of Management - What is the importance of managing systems and processes in achieving effective and efficient production and operations?
Team leadership : How do you suppose team leadership would respond? What would be the ideal response?
Explian what are your retailer profits for each stock level : What are your retailer profits for each stock level? Supplier profits for each stock level? Supply chain total for each stock level?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write down a java implementation

Write down a Java implementation

  Developing the java program

Write down a program in java to input the basic salary of 15 persons. Each one of them receives 25% of basic as hra (house rent allowance), 15 % of the basic as conveyance and 10 % of the basic as an entertainment allowance.

  Displaying recent entries of windows security event log

Issue a command which will show 100 most recent entries within the Windows security event log displaying only those entries which were a successful logon event by the Interactive logon.

  How can state the units for each metric

express the units for each metric, such as dollars per hour, rejects per day, schedule slippage per task in days, budgeted versus actual cost expenditure per task,etc. One character in a group I once had expressed the progress of laying a cable in..

  Find whether the numbers would be an arithmetic

assume you are given a list of n integers in random order. Describe an algorithm that will determine whether the numbers would be an arithmetic progression if they were sorted.

  Difference between re-engineering and process redesign

What is the procedure of creating design specifications and what are differences between design testing and functional testing.

  Questions on risc machine

Questions on RISC machine

  Implementing c++ program that simulates a submarine

Design and implement the C++ program which simulates a submarine. If sub tries to leave area or it wanders into the shallow area, the simulation should end. Initialize array to -1. The user should be able to move the sub up, left, right and down.

  Products were completely hardware based

Starting in 1981, designs for the Navigation Systems incorporated a microprocessor and an increasing number of integrated circuits. To support the microprocessor-based designs, Navigation Systems Inc.

  Express the top five categories of problems

Compare the two different systems and present the findings in tabular format.

  Design and organize forensics report

When the investigation is complete and facts and findings are captured within your forensics report you should assure that the forensic report is organized in the correct manner and you are prepared for the courtroom testimony. Explain the details..

  Program to find smaller between num1 and num2 to output

Program to find smaller between num1 and num2 to output

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