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

  Determining the counterexample

Determine a counterexample for following algorithm on the basis of greedy strategy: Choose the largest subset for cover, and then delete all its elements from the universal set.

  Describing the car structure

Write down a definition statement which describes a Car structure variable initialized along with the following information: Make: Ford Model: Mustang.

  Decribe the functions of a network node manager

Explain the processes that take place during network discovery and mapping.

  Image smoothing with gaussian masks and c++

Implement the image smoothing utilizing the convolution with Gaussian masks with C++. You must utilize 2 input images which are pgm files. First, implement 2D Gaussian convolution utilizing the 1D Gaussian masks.

  Drawing the uml state diagram

In the chess game white and black make alternate moves. White takes first move. Both Black and White may finish the game: by winning, by giving up, by draw.

  Differences between the unix and window traceroute

Write down the differences between UNIX (or Linux) and Window Traceroute.

  Decreasing risk of malicious attacks

While a large percentage of the information technology security budgets is devoted to decreasing the risk of malicious attacks, there exist other ways in which systems or data become damaged.

  What is the expected access time

Given a 64-byte cache block, a 512 KB fully associative cache (assume byte-addressable), and a 32 bit address reference, which bits could be used for tag, index, and offset.

  Plan an algorithm that finds k smallest numbers

plan an algorithm that finds k smallest numbers of the whole G sorted in ascending order and has time complexity O(m*lg(m)) and spatial complexity O(m).

  Monitoring of patient vital signs using mobile computing

Compare and contrast the monitoring of patient vital signs utilizing the mobile computing technology to in-patient visits to the doctor’s office or hospital.

  Reducing the cost per bit transmitted in lans or wans

Systematic and the logical storage of electronic files.specify if reducing the cost per bit transmitted more significant in the LANs or WANs.

  What are the advantages of this architecture

Reduced instruction set computers provide a large number of general-purpose registers and very few memory access instructions. Most instructions use registers instead of memory. What are the benefits of such architecture? Can you think of a disadv..

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