Logo 
Search:

C++ Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C++ ProgrammingRSS Feeds

What is Quick Sort (Partition Exchange Sort) in dfs (data file structure)?

  Shared By: Adalicia Fischer    Date: Mar 09    Category: C++ Programming    Views: 1601

Answer:

This sorting technique performs very well on larger tables. At each step in the method, the goal is to place a particular record in its final position within a table. This technique essentially partitions the table into two subtables. The same process can then be applied to each of these subtables and repeated until all records are placed in their final positions.

Pass:

Initially the elements of the array are:
42 23 74 11 65 58 94 36 99 87

-------------------->

42 23 74 11 65 58 94 36 99 87
42 23 74 11 65 58 94 36 99 87
42 23 74 11 65 58 94 36 99 87
42 23 74 11 65 58 94 36 99 87
42 23 74 11 65 58 94 36 99 87
42 23 36 11 65 58 94 74 99 87
42 23 36 11 65 58 94 74 99 87
42 23 36 11 65 58 94 74 99 87
42 23 36 11 65 58 94 74 99 87
42 23 36 11 65 58 94 74 99 87
42 23 36 11 65 58 94 74 99 87
11 23 36 42 65 58 94 74 99 87 i>=j

-------------------->

Share: 
 



Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: