Skip to content

Commit

Permalink
Add one more usage of the start: Int and end: Int parameters of the q…
Browse files Browse the repository at this point in the history
…uickSort function of the 060quickSort1.kt
  • Loading branch information
sagarpatel288 committed Oct 15, 2024
1 parent 9bf4b2d commit 847ed98
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/level40Module4AlgorithmExercise/060quickSort1.kt
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ fun main() {
*
* TL;DR: We need [start], and [end]:
* To get a partition index for the given range.
* To find how much, how long, from when and up to which point we need to iterate through [input] to avoid repetition.
*
* And we need [input] to iterate through it, so that we can compare each element with a pivot, and swap positions
* in such a way that all the elements smaller than or equal to the pivot, stays left to the pivot, and all the
* elements greater than the pivot, stays right to the pivot.
Expand Down

0 comments on commit 847ed98

Please sign in to comment.