Express the shaker sort in pseudo code

Assignment Help Basic Computer Science
Reference no: EM131452900

The shaker sort (or bidirectional bubble sort) successively compares pairs of adjacent elements, exchanging them if they are out of order, and alternately passing through the list from the beginning to the end and then from the end to the beginning until no exchanges are needed

1. Show the steps used by the shaker sort to sort the list 3, 5, 1, 4, 6, 2.

2. Express the shaker sort in pseudo code.

3. Show that the shaker sort has O(n2complexity measured in terms of the number of comparisons it uses.

4. Explain why the shaker sort is efficient for sorting lists that are already in close to the correct order.

5. Show that (n log n2)3 is O(n6).

6. Show that 8x3+ 12+ 100 log is O(x3).

7. Give a big-estimate for (x2 + x(log x)3· (2xx3).

Reference no: EM131452900

Questions Cloud

Argue for or against the limitation of speed limits : PSCI 2231 : Write a composition using one of the topics listed below. Your composition needs to be three to five paragraphs long.
Method for making wise decisions in the face of uncertainty : Comment on the statement bringing out clearly how does statistics help in business decision-making.
What is the utilization during peak hours : An AS/RS is used for work-in-process storage in a manufacturing facility. The AS/RS has five aisles, each aisle being 120 ft long and 40 ft high.
Describe concepts as if you were explaining them to a friend : Describe the concepts as if you were explaining them to a friend. How will you use the concepts in the class or in your personal or professional life?
Express the shaker sort in pseudo code : 1. Show the steps used by the shaker sort to sort the list 3, 5, 1, 4, 6, 2. 2. Express the shaker sort in pseudo code.
Discuss the guidelines for safe materials handling : Discuss at least five of the barriers and challenges to employee involvement in safety efforts. Discuss the guidelines for safe materials handling.
Determine acceleration and deceleration : An AS/RS with one aisle is 300 ft long and 60 ft high. The S/R machine has a maximum speed of 300 ft/min in the horizontal direction.
Provide a theoretical analysis : provide a theoretical analysis. In this analysis, you can focus on either the rule-breakers or the rule-makers.
What other problems with msdss are likely to remain despite : With the adoption of GHS by OSHA, the problems associated. What other problems with MSDSs are likely to remain despite the standardized formatting?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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