Open in TheBrain

Worst Case: O(n^2)