Jérome Eertmans 8cce0d463a
refactor: pivot is randomly chosen (#6643)
As described in #6095, this reduces the chances to observe a O(n^2) complexity.

Here, `collection.pop(pivot_index)` is avoided for performance reasons.

Fixes: #6095
2022-10-05 11:32:07 +01:00
..
2020-10-03 20:49:08 +05:30
2020-11-25 09:54:31 +01:00
2020-10-15 13:45:17 +02:00
2021-02-11 17:49:53 +01:00
2021-09-07 13:37:03 +02:00
2022-10-01 14:17:15 +02:00
2021-02-26 09:01:50 +08:00
2021-09-07 13:37:03 +02:00
2019-10-18 08:13:58 +02:00
2020-05-17 22:48:39 +02:00
2019-07-30 18:06:48 +02:00
2020-05-21 21:50:52 +02:00
2020-09-25 09:18:00 +02:00