Linked Lists: Detect a Cycle

  • + 1 comment

    it should be if(fast==null && fast.next==null) return false;