One of the simplest sorting algorithms to implement. The idea is to select the smallest element from the unsorted array and place it in its right position. With every iteration, the unsorted array gets shorter until there is no element to place in its correct position.
Time Complexity: O(n^2)
Space Complexity: O(1)
Space Complexity: O(1)
No comments:
Post a Comment