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
i:=1 while(i { x:=x+1; i:=i+1; }

What are the things require to implement ADT Abstract data types are very useful for helping us understand the mathematical objects which we use in our computations but, of cou

In this respect depth-first search (DFS) is the exact reverse process: whenever it sends a new node, it immediately continues to extend from it. It sends back to previously explore

Two linked lists are having information of the same type in ascending order. Write down a module to merge them to a single linked list that is sorted merge(struct node *p, stru

This is the most extensively used internal sorting algorithm. In its fundamental form, it was invented by C.A.R. Hoare in the year of 1960. Its popularity lies in the easiness of i

Triangular Matrices Tiangular Matrices is of 2 types: a)  Lower triangular b)  Upper triangular

The number of interchanges needed to sort 5, 1, 6, 2 4 in ascending order using Bubble Sort is 5

This unit discussed about data structure called Arrays. The easiest form of array is a one-dimensional array which may be described as a finite ordered set of homogeneous elements

With the help of a program and a numerical example explain the Depth First Traversal of a tree.

Write an algorithm to print all even numbers in descending order and draw the flowchart