Hello everyone,
The solution states that the time complexity is:
O(n) + O(n - 1) + O(n) => O(n)
Where are we getting the first O(n)? I understand that the second O(n - 1) is coming from the worst-case number of swaps and the last O(n) is coming from the final iteration to check for the missing number.
Thanks!