Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content
Alternate Solution Wrong. Here the counterexample:

subscriptions.michel

Mar 11, 2025

Counter example. The following should return true (Cycle -3 -> -2 -> -1 -> -3), but the official solution returns false.

std::vector<int> arr1 = {1,2,-3,-1,1-2};

1

0

Comments
Comments

On this page