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
AVL trees are applied into the given situations: There are few insertion & deletion operations Short search time is required Input data is sorted or nearly sorted

Explain process of B-TREE and what difference between AVL Tree Using Algorithms

A binary tree of depth "d" is an almost complete binary tree if  A) Every leaf in the tree is either at level "d" or at level "d-1"  B)  For any node "n" in the tree with a

Preorder traversal of a binary tree struct NODE { struct NODE *left; int value;     /* can take any data type */ struct NODE *right; };   preorder(struct N

A full binary tree with n leaves have:- 2n -1 nodes.

Which are the two standard ways of traversing a graph? i. The depth-first traversal   ii. The breadth-first traversal

Demonstration of Polynomial using Linked List # include # include Struct link { Char sign; intcoef; int expo; struct link *next; }; Typedefstruct link

I was wanting to know where this web site was created. My second question is,,, are the online tuters accredited teachers? If they are, are they only working for the website or ma

Thus far, we have been considering sorting depend on single keys. However, in real life applications, we may desire to sort the data on several keys. The simplest instance is that

what is folding method?