Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Solve Missing Number by sorting and comparing indices
After sorting the array in ascending order, we compare each index `i` with `nums[i]` to find the missing number. The time complexity is O(n log n) due to the sorting step. We might revisit this problem later to explore a more optimal O(n) solution with constant extra space.
- Loading branch information