Determine the big-oh for the performance of your algorithm

Assignment Help Computer Engineering
Reference no: EM132104981

The Problem

Integer numbers must be loaded into and stored in a stack such that the largest value is always stored at the top position (that is the numbers are kept sorted in decreasing order).

The numbers are read by the program from a file. The numbers in the file are not necessarily sorted.

The stack must be linked list based.

Generic implementation is required, that is, the data in the nodes must be objects. Use the Integer type at instantiation for data rather than int.

The implementation must be tested and the result (decreasing storage) verified.

Determine the big-Oh for the performance of your algorithm

Analysis and Design

Make a careful design before implementation. Decide about the classes and additional methods needed to load up the stack.

Write a pseudo-code (attach it as a comment after the Application class).

Implementation and Testing

When a new element is added to the stack, one or more elements may have to be popped, since the new value may not be greater than the current top value.

You will need a temporary storage for these popped elements before they can be pushed back. You must use a second stack for temporary storage .

Document your program.

Reference no: EM132104981

Questions Cloud

Give a new yes-instance of problem pihs : Can the set V of vertices be partitioned into exactly k disjoint sets V1; V2; V3.... Vk such that, for 1
Income statement for september : The company expects to sell $560 units in September. Example of an income statement for September using contribution margin format.
Implement the method and constructor with added requirement : addAll( ) : adjust the type of the parameter, it is an ArrayBag with the same generic type parameter; the method checks.
Explore the issue of truthfulness in the stable matching : Explore the issue of truthfulness in the Stable Matching Problem and specifically in the Gale-Shapley algorithm.
Determine the big-oh for the performance of your algorithm : The numbers are read by the program from a file. The numbers in the file are not necessarily sorted.
Create a struct that contains four integer fields : To do this problem, you will need to dynamically create a struct that contains 4 integer fields. The fields should be called X, Y, TheSum and TheProduct.
Show the tables in 1nf and 2nf that are created in process : Use the process of normalization to transform the table below into 3NF. Show the tables in 1NF and 2NF that are created in the process.
Concern to entrepreneurs : Why should ethics or social responsibility be of concern to entrepreneurs (how an establishment reacts to the demands of its stakeholders)?
Growth strategy of starbucks : The strategy was proposed after following a defined process of analysis and drawing inference as all the study and their result is also included in the proposal

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