def is_unique(nums: list[int], first=0, second=0) -> bool:
if first == len(nums) - 1 and second == len(nums) - 1:
return True
else:
if second == len(nums):
first += 1
second = 0
if first != second and nums[first] == nums[second]:
return False
return is_unique(nums, first, second + 1)
How can I analyze the time complexity of my implementation? I think the worst case is O(n^2) of time complexity, and with space complexity the same.