This is not the best sort, to say the least. But I do appreciate in this video how it demonstrates O(n^2) time complexity with just a single loop. Just because it's only one loop doesn't mean you're getting away with O(n)!
This is not the best sort, to say the least. But I do appreciate in this video how it demonstrates O(n^2) time complexity with just a single loop. Just because it's only one loop doesn't mean you're getting away with O(n)!