Given the head of a linked list, return true if it contains a cycle. Input format Input is [[values, pos]] : the node values and pos , the index the tail's next connects back to ( -1 for no cycle). The harness builds the (possibly cyclic) list and passes you its head ListNode . e.g. [[[3,2,0,-4],1]] links the tail back to index 1.