Sort Colors

ID: 75; medium

Solution 1 (Go)

Solution 2 (Go)

[0, i): the interval containing all 0's

[i, j): the interval containing all 1's

[j ,k): the interval to be explored

[k ,len(nums)): the interval containing all 2's

Solution 3 (Java)

Notes

  • Quick sort

Solution 4 (Java)

Notes

  • Not really a "solution"...

Solution 5 (Java)

Notes

Last updated

Was this helpful?