Back to course home
0% completed
Vote For New Content
A better solution
Mohammed Dh Abbas
Jul 20, 2024
class Solution: def findNumber(self, nums): def swap(i, j): nums[i], nums[j] = nums[j], nums[i] for i in range(len(nums)): while nums[i] != i + 1 and nums[i] != nums[nums[i] - 1]: swap(i, nums[i] - 1) return nums[-1]
0
0
Comments
Comments
On this page