Fetching algorithms...
Fetching algorithms...
nums = [3, 1, 5, 4, 2][1, 2, 3, 4, 5]nums = [2, 6, 4, 3, 1, 5][1, 2, 3, 4, 5, 6]nums = [1, 5, 6, 4, 3, 2][1, 2, 3, 4, 5, 6]nums = [5, 4, 3, 2, 1][1, 2, 3, 4, 5]nums = [1][1]Time Complexity
Space Complexity