answersLogoWhite

0

input: an array a of length n with array elements numbered 0 to n − 1

inc ← round(n/2)
while inc > 0 do:
for i = inc .. n − 1 do:
tempa[i]
ji
while jinc and a[jinc] > temp do:
a[j] ← a[jinc]
jjinc
a[j] ← temp
inc ← round(inc / 2.2)

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What is the complexity of bucket sort?

o(n)


What are some examples of pseudocode for sorting algorithms, and how do they differ in terms of efficiency and implementation?

Some examples of pseudocode for sorting algorithms include Bubble Sort, Selection Sort, and Merge Sort. These algorithms differ in terms of efficiency and implementation. Bubble Sort is simple but less efficient for large datasets. Selection Sort is also simple but more efficient than Bubble Sort. Merge Sort is more complex but highly efficient for large datasets due to its divide-and-conquer approach.


What is the runtime complexity of the bucket sort algorithm?

The runtime complexity of the bucket sort algorithm is O(nk), where n is the number of elements to be sorted and k is the number of buckets used.


Is there a a movie called Two tears in a bucket?

Two Tears In A Bucket it a movie about a guy that figures out that his grandfather dies she the guy goes home to sort things out


How to write pseudocode in Microsoft Word?

To write pseudocode in Microsoft Word, you can use the built-in Equation Editor or insert a text box and type your pseudocode inside it. You can also use a monospaced font like Courier New to format your pseudocode for better readability.


Types of algorithm?

pseudocode


What is imitation code?

pseudocode


What is a pseudocode design tool?

SPOK (Structured Prose Organizer for KEDIT) is a pseudocode design tool. (SPOK4 at Verizon.Net)


Difference between pseudocode and structured English?

structured English resembles spoken Englishwhere as pseudocode resembles programming languageWhat_are_the_differences_between_structured_English_and_pseudo_code


Develop an algorithm to display all prime numbers from 2 to 100 Give both the pseudocode version and the flowchart version Convert your pseudocode into a Java program?

Develop an algorithm to display all prime numbers from 2 to 100. Give both the pseudocode version and the flowchart version. Convert your pseudocode into a Java program.


What is the pseudocode for the selection sort algorithm and how does it work?

The pseudocode for the selection sort algorithm is as follows: Start with the first element as the minimum. Compare the minimum with the next element in the list. If the next element is smaller, update the minimum. Continue this process until the end of the list is reached. Swap the minimum element with the first element. Repeat the process for the remaining elements in the list. Selection sort works by repeatedly finding the minimum element from the unsorted part of the list and swapping it with the first unsorted element. This process continues until the entire list is sorted.


What language is pseudocode written in?

Pseudocode is more a process description than actual code. Since it is just describing the logic and processes of a proposed program it can be written in ANY written language, note that while it could theoretically be written in a "computer language", that sort of defeats the purpose of the pseudo code which intended for human reading rather than machine reading.