Demonstrate how this search would go

Assignment Help Computer Engineering
Reference no: EM1327708

Consider searching algorithms on the following array of data:
[22 21 9 4 16 2 10 14 20 31 26 19 17 28 8 13]

Suppose you want to implement a searching algorithm to see if the data set contains the number 19. Demonstrate how the search would go if you used:

A sequential search

A binary search

State the runtime for each of the searches, in this example, and for general data sets of size n. Address the issue of the order of the data in binary searching.

Suppose an algorithm that processes a data set of size 8 has a runtime of 72, and the same algorithm on a data set of size 20 has a runtime of 420. Using big-O notation, state the runtime for this algorithm for the general case of a data set of size n.
Suppose you develop an algorithm that processes the first element of an array (length of n), then processes the first 2 elements, then the first 3 elements, and so on, until the last iteration of a loop, when it processes all elements. Thus, if n = 4, the runtime would be 1 + 2 + 3 + 4 = 10.

Create a table that depicts the runtime for arrays of length 1 to 10. Would you expect the general runtime to be O(n), O(n2), O(n3), or some other function of n? Explain.

Reference no: EM1327708

Questions Cloud

Calculating present values of cash flows : You can purchase property today for $3.3 million and sell it in 5 years for $4.3 million. (You earn no rental income on the property.)
Bureaucratic costs increase : Given an example of how and why do bureaucratic costs increase a company goes.
Essay-environmental factors impact managers and leaders : The topic for the assignment is to discuss - How do environmental factors impact managers and leaders of organizations?
Show the impact of new technology on customers : Show the Impact of new technology on customers - end users or outside customers. Must be about a specific technology for a specific company.
Demonstrate how this search would go : assume an algorithm that processes a data set of size 8 has a runtime of 72, and the same algorithm on a data set of size 20 has a runtime of 420. Using big-O notation, state runtime for this algorithm for the general case of a data set of size n.
Explain important information about e business : Explain Important information about E Business and difference between Internet, Intranet and Extranet
Present and future values with varying interest rates : If the interest rate this year is 7.2% and the interest rate next year will be 9.2%, what is future value of $1 after 2 years? What is present value of a payment of $1 to be received in 2 years?
Explain project management in the business world : Project management in the business world - describe project management and explain its importance to the business world and describe project life-cycle management and the benefits of project management to an organization.
Compare between a trend-moving and centered-moving average : Compare between a trend-moving average and a centered-moving average.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Findout which one is false statement

Findout which one is false statement.

  Establish a formal evaluation criterion

Why would it be wise to build a formal evaluation criterion for a company to use when purchasing new hardware or software.

  How to create a set in third normal

How to create a set in third normal RESERVATION(reservation id, date of reservation, start date, end date, (( customer id, customer name, customer address, customer type, customer type description, ((customer preferences)), customer credit card n..

  Risks in the development of wearable pda

Assume an entrepreneur is proposing in order to design a wearable PDA which is unobtrusive and responds to the voice commands.

  What are race situations difficult to debug

assume the legislature in your state is debating the adoption of UCITA and you have been known as an expert witness. What are the three most important ideas you want your legislators to get from the testimony.

  Describe different structures and areas within brain

make sure to discuss the location in the brain, their functions, disorders/pathology related to damage to these structures, and other important information in regards to these structures.

  What are some of the changes to technology

How has this technology impacted the development of new software? Even if the technology change is hardware related, software development can be impacted.

  Explaining the role of cio

Assess the role of CIO within any health care organization and explain the key characteristics a CIO would require to possess to be effective in that position.

  What is the variety of addresses available in each networks

What is the variety of addresses available in each  networks

  Write down a java implementation

Write down a Java implementation

  What to recommend as a method of change

Contemporary organizations should be supportive of widening the span of control, flattening structure, and forming collaborative and flexible teams.

  Program to determine persons body mass index

Develop a program which determines a person's body mass index. Develop the modular program which determine and display a person's body mass index (BMI).

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