Рет қаралды 1,601,851
In this visualization, the distance of each vertex from the center is determined by how correct of a position that number is in. For example, if the number 1 is in the middle of the array, it will produce a very short line, as it is supposed to be the first element in the array. However, if the number 1 is near the beginning or end of the array, it will produce a much longer line. This means that, when fully sorted, every vertex will be at its max distance, and a loop will be produced.