Smallest Stable Index I

Solution Code

Time Complexity

O(n^2)

Space Complexity

O(1)