Shell sort and bubble sort

Assignment Help JAVA Programming
Reference no: EM131591970

The Shell sort is a variation of the bubble sort. Instead of comparing adjacentvalues, the Shell sort adapts a concept from the binary search to determine a‘gap' across which values are compared before any swap takes place.

In thefirst pass, the gap is half the size of the array. For each subsequent pass, thegap size is cut in half. For the final pass(es), the gap size is 1, so it would bethe same as a bubble sort. The passes continue until no swaps occur.

I have all of the code done their is just a small error that is needing fixing.

Attachment:- Shellsort.rar

Reference no: EM131591970

Questions Cloud

Explain the managerial significance of the accounting : (Revenue Recognition on Marina Sales with Discounts) Taylor Marina has 300 available slips that rent for $800 per season.
What are your ethical obligations : What are your ethical obligations? What ethical theories apply to your situation, and why?
Sales and receivables are entered at gross selling price : (Sales Recorded Both Gross and Net) On June 3, Hunt Company sold to Ann Mount merchandise having a sales price of $8,000 with terms of 2/10, n/60, f.o.b.
Four steps in the delegation model : Describe in depth the four steps in the Delegation Model. Please do not just list these steps. Discuss personal examples of situations where delegation worked.
Shell sort and bubble sort : Shell sort is a variation of the bubble sort. Instead of comparing adjacentvalues, the Shell sort adapts a concept from the binary search to determine a gap
What is Tom effective annual rate : During the year the stock paid dividends of $7.03 per share. What is Tom’s effective annual rate?
What is the equilibrium price and quantity in this market : The table below shows the demand and supply for ice creams. What is the equilibrium price and quantity in this market for ice creams
Does a company have obligation to be good corporate citizen : Does a company have an obligation to be a good corporate citizen? How might your responses to the first two questions translate to good strategy execution?
Different leadership theory paradigms : Compare and contrast two different leadership theory paradigms. Why did you choose the two paradigms you did and what assumptions lead you to your conclusions?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Create a class named integerset.

"The fourth array set is named fourthArrayName and was created by calling Method intersectionOfSets on the first two sets. It represents this set of numbers: { value1, value2, value3, valuen }." (Again note: that each number of the array is follow..

  While loop to count down every odd number from 40 to 0

Uses a while loop to count down every odd number from 40 to 0, printing each off number down to zero, except the number 3 and 33

  Write a code that tests for a match.

Comments in the code tell you where to write your statements. You can use the Mail Order Program in this chapter guide.

  Explain the reasons in each case

Array lists and linked lists are both implementations of lists - Explain the reasons in each case. Code is needed for each example, coupled with explanation

  Write a program that reads from a url

Review the three exercises that were discussed in the lectures - illustrates how to read from a URL - It reads each line from the given text file and displays

  Write an enhanced for loop

Write an enhanced for loop that counts how many numbers in an ArrayList object named list are negative. Print the count after the loop terminates

  What are the steps necessary to create a jar file

What are the steps necessary to create a JAR file where the main entry point is identified?

  Implement insert sorting algorithm

Write computer program to implement this algorithm and demonstrate the results and what is the machine run time in second for sorting array A?

  Java test program

Write a Java test program, all your code should be in the main method, that determines what type of organization is indicated by a web address. Your program should allow the user to enter a web address

  Purpose of alternative dispute resolution

Evaluate the purpose of Alternative Dispute Resolution (ADR) and, with particular reference to the services provided by Acas, assess to what extent it is a successful means of resolving disputes outside the formal judicial process.

  Write a function that searches a [n][n] matrix

there is a y or multiple y values with a blank on one side (left/right or top bottom) and a x on the other

  Creates a new set of animals

When a user creates a new set of animals, they need to be able to add an animal to the set.  They should also be able to update and delete animals in the set.  The organizer should only show one set of animals at a time

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