- Time : O(n)
- Space : O(1)
c++
1 | bool hasSingleCycle(vector<int> array) { |