Determine whether a linked list has a cycle — some node's next eventually points back to a node earlier in the list, instead of ending in null.
Do it in O(1) extra space (no storing visited nodes in a set).
Example:
Input: head = [3,2,0,-4], the tail connects back to index 1 (the node valued 2)
Output: true