Closed Louis-Vincent closed 4 years ago
Fixed a bug where quick_sort could access out of bound element when to argument smaller or equal to 0.
to
var xs = [1] default_comparator.quick_sort(xs) # assertion failed
var xs = [1] default_comparator.quick_sort(xs) assert xs == [1] # true
Signed-off-by: Louis-Vincent Boudreault lv.boudreault95@gmail.com
Good catch!
Fixed a bug where quick_sort could access out of bound element when
to
argument smaller or equal to 0.Before
var xs = [1] default_comparator.quick_sort(xs) # assertion failed
After
var xs = [1] default_comparator.quick_sort(xs) assert xs == [1] # true
Signed-off-by: Louis-Vincent Boudreault lv.boudreault95@gmail.com