Use some imagination and then it’s essentially the same as Linked List Cycle II.
Description
Given an array of integers nums containing n + 1 integers where each integer is in the range [1, n] inclusive.
nums
n + 1
[1, n]