title: Cracking the Coding Interview, 6th edition, 2.8
body: <p>Problem Statement: Given a circular linked list, implement an algoirthm that returns the node at the beginning of the loop.</p>
  
  <p>The answer key gives a more complicated solution than what I propose. What's wrong with mine?:</p>
  
  <pre><code>public static Node loopDetection(Node n1) {
      ArrayList&lt;Node&gt; nodeStorage = new ArrayList&lt;Node&gt;();
  
     while (n1.next != null) {
         nodeStorage.add(n1);
         if (nodeStorage.contains(n1.next)) {
             return n1;
         }
         else {
             n1 = n1.next;
         }
     }
  
     return null;
  }
  </code></pre>