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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly