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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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