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
Determine the Disjoint of division method A polygon is disjoint from the viewport if the x- and y-extents of the polygon do not overlap the viewport anywhere. In this case; reg



The objective analysis of an algorithm is to determine its efficiency. Efficiency is based on the resources which are used by the algorithm. For instance, CPU utilization (Ti

The complexity Ladder: T(n) = O(1). It is called constant growth. T(n) does not raise at all as a function of n, it is a constant. For illustration, array access has this c

Let G=(V,E) be a graph for which all nodes have degree 5 and where G is 5-edge is connected. a) Show that the vector x which is indexed by the edges E and for which xe = 1/5 for

It offers an effective way to organize data while there is a requirement to access individual records directly. To access a record directly (or random access) a relationship is

Merging 4 sorted files having 50, 10, 25 and 15 records will take time  O (100)

#question.explain different types of errors in data transmission.

Definition of Algorithm Algorithm must have the following five characteristic features: 1.      Input 2.      Output 3.      Definiteness 4.      Effectiveness 5