Sort the Sequence Using Merge Sort, Data Structure & Algorithms

Q. Sort the sequence written below of keys using merge sort.

66, 77, 11, 88, 99, 22, 33, 44, 55                                                                     

Ans:

Sorting using Merge sort technique:-

Original File       [66] [77] [11] [88] [99] [22] [33] [44] [55]

Pass1     [66 77] [11 88] [22 99] [33 44] [55]

Pass2         [11 66   77   88] [22 33   44   99] [55]

Pass3         [11 22   33   44   66   77   88   99] [55]

Pass4   [11 22   33   44   55   66   77   88   99]

 

Posted Date: 7/10/2012 5:04:49 AM | Location : United States







Related Discussions:- Sort the Sequence Using Merge Sort, Assignment Help, Ask Question on Sort the Sequence Using Merge Sort, Get Answer, Expert's Help, Sort the Sequence Using Merge Sort Discussions

Write discussion on Sort the Sequence Using Merge Sort
Your posts are moderated
Related Questions
Question 1 Describe the following- Well known Sorting Algorithms Divide and Conquer Techniques Question 2 Describe in your own words the different asymptotic func

implementation of fast fourier transforms for non power of 2

Implement a linear-expected-time algorithm for selecting the k th smallest element Algorithm description 1. If |S| = 1, then k = 1 and return the element in S as the an

Compare zero-address, one-address, two-address, and three-address machines by writing programs to compute: Y = (A – B X C) / (D + E X F) for each of the four machines. The inst

Explain in detail the algorithmic implementation of multiple stacks.

What do you understand by term structured programming? Explain the structured programming as well.                                 Ans. S tructured Programming is expla

how we can convert a graph into tree

Indexed Sequential Files An index is inserted to the sequential file to provide random access. An overflow area required to be maintained to permit insertion in sequence. I

Explain the Assertions in Ruby Ruby offers no support for assertions whatever. Moreover, because it's weakly typed, Ruby doesn't even enforce rudimentary type checking on opera