title: Why my program does not do a proper diagonal difference (C++)?
body: <p>for some reason my program does not give me the correct diagonal difference.for example in the input of
  (11 2 4)
  (4 5 6)
  (10 8 -12)
  its supposed to give me 15 by adding (11+5+(-12)) and (4+5+10) then doing abs difference of two, but gives me 6 for some reason.</p>
  <p>Here is my function for the code:</p>
  <pre><code>int diagonalDifference(vector&lt;vector&lt;int&gt;&gt; arr) {
         int result = 0;
         int difference = 0;
         int first_diagonal =0;
         int second_diagonal = arr.size();
         int add_for_first_diagonal = 0;
         int add_for_second_diagonal = 0;
         for(int row = 0; row &lt; (int)arr.size(); row++) {
             for(int column =0; column &lt; (int)arr.size(); column++) {
                 add_for_first_diagonal += arr[column][first_diagonal]; 
                 add_for_second_diagonal += arr[column][second_diagonal];
          }
            first_diagonal += row;
            second_diagonal -= row;
      }
        difference = first_diagonal - second_diagonal;
        result = abs(difference);
        return result;
  }
  </code></pre>
  <p>Any help is appreciated. Thank you.</p>