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
Run time complexity of an algorithm is depend on

Draw a flowchart of a Booth''s multiplication algorithm and explain it.

Adjacency list representation An Adjacency list representation of Graph G = {V, E} contains an array of adjacency lists mentioned by adj of V list. For each of the vertex u?V,

Q. What do you understand by the term sparse matrix? How sparse matrix is stored in the memory of a computer? Write down the function to find out the transpose of a sparse matrix u

MID SQUARE METHOD

RENDERING, SHADING AND COLOURING By introducing hidden line removal we have already taken one step away from wire-frame drawings towards being able to realistically model and d

What do you mean by hash clash? Hashing is not perfect. Occasionally, a collision occurs when two different keys hash into the same hash value and are assigned to the same arra


Problem 1. You are asked to store Names of all 100 students of class A in your Learning Centre. Which data type will you use? What is its syntax? Explaining the data typ

Explain about the Abstract data type Abstract data type (ADT) A set of values (the carrier set) and operations on those values