title: To Detect A Cycle Why Do I need a Visited List and A stack?
body: <p>Why would just not having a visited set like this work to detect a cycle?</p>
  <p><img src="https://i.stack.imgur.com/X7VKj.png" alt="enter image description here" /></p>