Skip to main content
Code Review

Return to Revisions

2 of 2
replaced http://stackoverflow.com/ with https://stackoverflow.com/
  • There is no need to pass the vector itself. Iterators provide just enough information (notice that the real work is done by partition algorithm, and it doesn't need v).

  • partition doesn't look correct: i = left - 1 is an invalid iterator when left is v.begin(). It doesn't matter that you never dereference it, mere computation is an undefined behaviour.

  • Semi-open ranges are usually more convenient than closed ones.

vnp
  • 58.6k
  • 4
  • 55
  • 144
default

AltStyle によって変換されたページ (->オリジナル) /