This time your team decided to make a prototype of an algorithm visualization application. For starters, your teammates created a class called SelectionSort to run a selection sort algorithm and a class called AlgorithmVisualizer to control the algorithm execution step by step both forward and backward. All visualization logic is finalized but one required class and some methods in SelectionSort have not been implemented yet, and this will be your task.
Look carefully at the SelectionSort class and decide which fields represent its state, then implement the SelectionSort.SortState class to store snapshots of the SelectionSort state, and after that implement the getState and setState methods in SelectionSort to actually save and restore its state. That's it!