title: How to find the length of a linked list that is having cycles in it?
body: <p>This was one of the interview questions asked. How to find the length of a linked list that is having cycle in it. I know how to calculate whether a linked list has a cycle or not using Hare and Tortoise technique. I even know how to calculate the length by storing the addresses in a hashset. The running time of the Algorithm should be O(n).</p>
  
  <p>But what I was not able to tell is how to calculate the length of the linked list without using a external space of O(n). Please help me. Thank you.</p>