Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Step1: 15, 10, 13, 9, 12, 7
- Condition Check:
- i<Pivot and j>Pivot
- 15 < 7 and 12 > 7
- false and true
- So (i) will remain pointing to 15 which is at 0th position and (j) will move towards let and will point to 9.
- 15=>(i), 10, 13, 9=>(j), 12, 7=>PIVOT
- Step 2:
- 15=>(i), 10, 13=>(j), 9, 12, 7=>PIVOT
- 15=>(i), 10=>(j), 13, 9, 12, 7=>PIVOT
Add Comment
Please, Sign In to add comment