Having trouble understanding this if statement
if (nums[i] != nums[nums[i] - 1])
Also, if numbers are missing, how can we put numbers at their correct indices as some of them will never be correct.
Please explain.
Course: Grokking the Coding Interview: Patterns for Coding Questions - Learn Interactively
Lesson: Find all Missing Numbers (easy) - Grokking the Coding Interview: Patterns for Coding Questions