Exercises for Chapter #5 of A Common-Sense Guide To Data Structures and Algorithms

Get The Book!Regarding the array [50, 60, 70, 20, 30, 10]:

- Describe the exact steps that Selection Sort would take on the array.
- How many comparisons occurred?
- How many swaps occurred?

Regarding the array [10, 20, 30, 40, 50, 60]:

- Describe the exact steps that Selection Sort would take on the array.
- How many comparisons occurred?
- How many swaps occurred?

Regarding the array [60, 50, 40, 30, 20, 10]:

- Describe the exact steps that Selection Sort would take on the array.
- How many comparisons occurred?
- How many swaps occurred?

How would you describe in Big O Notation:

- An algorithm that takes 2N steps?
- An algorithm that takes log(N / 2) steps?
- An algorithm that always takes 2,532 steps?