title: Check if N sections intersect
body: <p>folks! I need to implement the function <strong>static bool CheckSectionsIntersect</strong> that checks if the sections intersect (right → ; left ←; down ↓;
  up ↑). Given a list of N consecutive vertical and horizontal sections of fixed dimensions in a form of a succession of directions. I have to think that I would have a route of N sections.
  The function should return True if I get to a point I've been to before.
  For example:</p>
  <p>N = 6: { up, left, down, down, right, up} - return True.</p>
  <pre><code>⬇⬅
  ⬇⬆  &lt;- Start
  ➡⬆
  </code></pre>
  <p>N = 4: {down, left, up, left} - return False.</p>
  <pre><code>⬅⬇  &lt;- Start
  ⬆⬅
  </code></pre>
  <p>The code I wrote, but is incomplete because I need some suggestion to how should be the function:</p>
  <pre><code>    static void Main()
      {
          string userInput = Console.ReadLine();
          int numberOfSections = Convert.ToInt32(userInput);
          string[] sectionDirection = new string[numberOfSections];
          for (int i = 0; i &lt; numberOfSections; i++)
          {
              sectionDirections[i] = Console.ReadLine();
          }
  
          Console.WriteLine(CheckSectionsIntersect(sectionDirection, numberOfSections));
      }
  
      static bool CheckSectionsIntersect(string[] sectionDirection, int numberOfSections)
      {
          return true; // I need an implementation here
      }
  }
  </code></pre>
  <p>}</p>
  <p>May I have any suggestion for this implementation, please?
  Thank you very much!</p>