Find out if the left substring to (i) when reversed, is equal to the right substring to (i)?
<p>I was given 30 minutes to complete the following task in an interview for an entry level C# developer role, the closest I could get to was to find out if the characters in both sides of the current index matched each other.</p>

<blockquote>
  <p>Construct an array which takes in an string and determines if at index
  (i) the substring to  </p>
  
  <p>the left of (i) when reversed, equals to the substring to the right of
  (i).</p>
  
  <p>example: "racecar"       </p>
  
  <p>at index(3) the left substring is "rac" and when reversed equals to
  the right substring "car".</p>
  
  <p>return (i) if met with such condition, eslse return -1.
  if string length is under 3, return 0;</p>
</blockquote>

<pre><code>  if (str.Length &lt; 3)
            return -1;

        for (int i = 0; i &lt; str.Length - 1; i++)
        {
            if(str[i-1] == str [i+1])
               return i;
        }
                return -1;
</code></pre>
