title: C# Codewars "Pyramid Slide Down" Challenge
body: <p>Given a &quot;Jagged Array&quot; (which is an array that's elements are other arrays), cycle through each array and <strong>return the sum of the number path that yeilds the highest value</strong>.  From a number, you may only add one of the two numbers that branch directly below it.</p>
  <p>Here is a simple example demonstrating the rules...</p>
  <pre><code>   1
    3 1
   1 2 9
  </code></pre>
  <p>This pyramid has four paths that will yield four different sums...</p>
  <blockquote>
  <p>Path 1 : ( 1 + 3 + 1 ) = 5</p>
  <p>Path 2 : ( 1 + 3 + 2 ) = 6</p>
  <p>Path 3 : ( 1 + 1 + 2 ) = 4</p>
  <p>Path 4 : ( 1 + 1 + 9 ) = 11</p>
  </blockquote>
  <p>The answer to be returned by my function should be 11 in this case.  The pyramid will always be at least 2 floors.</p>
  <p>Here is another example with visuals showing how pathing should work...</p>
  <pre><code>   /3/
    \7\ 4 
   2 \4\ 6 
  8 5 \9\ 3
  </code></pre>
  <p>The return for this pyramid should be 23.</p>
  <p>I've been told you can do it in nearly three lines.. I've just never worked with these kind of arrays since I'm newer with c#. (I've also been hinted to use &quot;recursion&quot;. Not really sure. Thanks!</p>
  <p>Edit: Here's my code... No idea if I'm doing this right.</p>
  <pre><code>    static void Main(string[] args)
      {
          int sum = 0;
          int[][] testArray =
          {
              //arrays themselves are i
              new int[]         {1}, //elements are j
              new int[]       {2, 1},
              new int[]     {3, 78, 7},
              new int[]   {1, 0, 2, 4},
              new int[]  {1, 2, 3, 4, 5},
              new int[] {4, 5, 6, 7, 8, 9}
          };
  
          for (int i = 0; i &lt; testArray.Length; i++)
          {
              for (int j = 0; j &lt; testArray[i].Length; j++)
              {
                  if (j &gt; testArray[i][j])
                  {
                      sum += testArray[i][j];
                      Console.WriteLine(sum);
                  }
              }
          }
  </code></pre>
  <p>I'll turn it into a method if I can get the logic working in the main</p>