Open sumba101 opened 5 years ago
insertion sort simulation gets stuck after an initial pass to select key number if the array is populated by duplicate elements
select insertion sort simulation in sorting using arrays choose random input option and fill array with same value
algorithm must account for case where all given elements are of same value
simulation gets stuck like in the picture below
working on solution for this, please do not attempt
Issue
insertion sort simulation gets stuck after an initial pass to select key number if the array is populated by duplicate elements
reproduction
select insertion sort simulation in sorting using arrays choose random input option and fill array with same value
expected output
algorithm must account for case where all given elements are of same value
actual output
simulation gets stuck like in the picture below