Quick sort method, Data Structure & Algorithms

Q. Explain quick sort? Sort the given array using quick sort method.

24 56 47 35 10 90 82 31                                                                      

Ans:

Quick sort is a sorting algorithm which uses the idea if divide and conquer. This algorithm chooses or selects an element known as pivot element, finds its position in the array such that it divides the array into the two sub arrays. The number of elements in the left sub array are less than and the elements in the right sub array are greater than the dividing element. Then the algorithm is repeated individually for these two sub array.

The given data is :-

 

24 56   47   35   10   90   82   31

1810_Quick Sort.png

Posted Date: 7/10/2012 5:38:53 AM | Location : United States







Related Discussions:- Quick sort method, Assignment Help, Ask Question on Quick sort method, Get Answer, Expert's Help, Quick sort method Discussions

Write discussion on Quick sort method
Your posts are moderated
Related Questions
Binary Space Partition A binary space-partitioning (BSP) tree is an efficient method for determining object visibility by painting surfaces onto the screen from back to front,

A binary search tree (BST), which may sometimes also be named a sorted or ordered binary tree, is an edge based binary tree data structure which has the following functionalities:

The above 3 cases are also considered conversely while the parent of Z is to the right of its own parent. All the different kind of cases can be illustrated through an instance. Le

What is a Spanning tree of a graph? A Spanning Tree is any tree having of vertices of graph tree and some edges of graph is known as a spanning tree.

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

Explain an efficient way of storing two symmetric matrices of the same order in memory. A n-square matrix array is said to be symmetric if a[j][k]=a[k][j] for all j and k. For

what is alphanumerical code

There are three typical ways of recursively traversing a binary tree. In each of these, the left sub-trees & right sub-trees are visited recursively and the distinguishing feature

Using stacks, write an algorithm to determine whether the infix expression has balanced parenthesis or not Algorithm parseparens This algorithm reads a source program and