WELCOME TO MY
PRESENTATION
VERSITY OF SCIENCE AND THECHNOLOGY CHITTAGONG
ACULTY OF SCEINCE ENGINEERING AND TECHNOLOGY
Submitted to:
Sohrab Hossain
Assistant Professor ,
Dept of CSE .
Submitted by:
Md Abdul Kuddus
Roll: 15010102
Batch: 25th Dept: CSE
SUBJECT :
QUICK SORT
Procedure:
It is one of the fastest sorting techniques available.
Like binary search, this method uses a recursive , devide and conquer
strategy
The basic idea is to separate a list of items into two parts,
Surrounding a distinguished item calls pivot
At the end of the process, one part will contain items
Smaller than the pivot and the other part will contain items
Larger than the pivot
5 3 8 9 1 0 2 6 47
GIVEN SERIES
EXAMPLE:
SELECT THE PIVOT ELEMENT
5 3 8 9 1 7 0 2 6 4
p
ITERATION -1
5 3 8 9 1 7 0 2 6 4
P L R
SWAP THE ELEMENTS
5 3 4 9 1 7 0 2 6 8
5 3 4 9 1 7 0 2 6 8
P L R
SWAP THE ELEMENTS
5 3 4 2 1 7 0 9 6 8
5 3 4 2 1 7 0 9 6 8
P L R
SWAP THE ELEMENTS
5 3 4 2 1 0 7 9 6 8
P R L
0 3 4 2 1 5 9 6 8
0 3 4 2 1 5 7 9 6 8
P>R>L
7
0 3 4 2 1 5 7 9 6 8
ITERATION-2
P L P LR R
SWAP THE ELEMENTS
0 1 4 2 5 7 6 9 83
0 34 21 5 7 96 8
P L P LR R
SWAP THE ELEMENTS
0 1 5 6 7 9 832 4
0 32 41 5 7 96 8
SWAP THE ELEMENTS
0 1 5 6 7 8 942 3
0 1 2 3 4 6 7 95
SORTED SERIES
8
ALGORITHM:
1.Algorithm quicksort (p,q)
2.{
3.If (p<q) then
4. {
5.j=partition(a,p,q+1);
6.Quicksort(p,j-1);
7. Quicksort (j+1,q);
8. }
9. }
THANK YOU

Quick sort algorithm using slide presentation , Learn selection sort example by power point presentation

  • 1.
  • 2.
    VERSITY OF SCIENCEAND THECHNOLOGY CHITTAGONG ACULTY OF SCEINCE ENGINEERING AND TECHNOLOGY
  • 3.
    Submitted to: Sohrab Hossain AssistantProfessor , Dept of CSE . Submitted by: Md Abdul Kuddus Roll: 15010102 Batch: 25th Dept: CSE
  • 4.
  • 5.
    Procedure: It is oneof the fastest sorting techniques available. Like binary search, this method uses a recursive , devide and conquer strategy The basic idea is to separate a list of items into two parts, Surrounding a distinguished item calls pivot At the end of the process, one part will contain items Smaller than the pivot and the other part will contain items Larger than the pivot
  • 7.
    5 3 89 1 0 2 6 47 GIVEN SERIES EXAMPLE:
  • 8.
    SELECT THE PIVOTELEMENT 5 3 8 9 1 7 0 2 6 4 p
  • 9.
    ITERATION -1 5 38 9 1 7 0 2 6 4 P L R
  • 10.
    SWAP THE ELEMENTS 53 4 9 1 7 0 2 6 8
  • 11.
    5 3 49 1 7 0 2 6 8 P L R SWAP THE ELEMENTS 5 3 4 2 1 7 0 9 6 8
  • 12.
    5 3 42 1 7 0 9 6 8 P L R SWAP THE ELEMENTS 5 3 4 2 1 0 7 9 6 8 P R L
  • 13.
    0 3 42 1 5 9 6 8 0 3 4 2 1 5 7 9 6 8 P>R>L 7
  • 14.
    0 3 42 1 5 7 9 6 8 ITERATION-2 P L P LR R SWAP THE ELEMENTS 0 1 4 2 5 7 6 9 83
  • 15.
    0 34 215 7 96 8 P L P LR R SWAP THE ELEMENTS 0 1 5 6 7 9 832 4
  • 16.
    0 32 415 7 96 8 SWAP THE ELEMENTS 0 1 5 6 7 8 942 3
  • 17.
    0 1 23 4 6 7 95 SORTED SERIES 8
  • 18.
    ALGORITHM: 1.Algorithm quicksort (p,q) 2.{ 3.If(p<q) then 4. { 5.j=partition(a,p,q+1); 6.Quicksort(p,j-1); 7. Quicksort (j+1,q); 8. } 9. }
  • 19.