I know 2d(slow)=d(fast)
But how to get the 2(F+a)=F+nC+a?
Course: Grokking Coding Interview Patterns in Java - Learn Interactively
Lesson: Solution: Find The Duplicate Number - Grokking Coding Interview Patterns in Java
I know 2d(slow)=d(fast)
But how to get the 2(F+a)=F+nC+a?
Course: Grokking Coding Interview Patterns in Java - Learn Interactively
Lesson: Solution: Find The Duplicate Number - Grokking Coding Interview Patterns in Java
Hi @Jackie1,
We’ve updated the solution explanation. Step-by-step explanation of the formula has been added in the lesson.
Thank you for the feedback. Happy learning