Given a linked list head, return true if there is a cycle or not.
Anonymous
I used the fast and slow pointer approach and said if the fast pointer reaches the null pointer then return false. If not at some point in the cycle the two pointer will be pointing the same node and then if that's the case return true.
Check out your Company Bowl for anonymous work chats.