Randomising and Sorting Flashcards
1
Q
how to randomize
A
create an ordered list
swap each element with a random index in the list (using temp arrays)
2
Q
how to sort
A
take a list
for each element compare it with the next element. if that is lower, we swap their positions