title: find the row with the largest sum in a matrix dynamic programming
body: <p>i have a matrix and I have to find the row with the largest  sum. The algorithm should use dynamic programming.</p>
  
  <p>4 <strong>5</strong> 3 2 1<br>
  2 2 <strong>7</strong> 2 5<br>
  1 <strong>4</strong> 2 5 6<br>
  <strong>9</strong> 1 2 1 6</p>
  
  <p>The numbers need to be directly or diagonally connected.
  My idea was to search the largest number in every line and check if it is directly or diagonally connected to the largest number of the next line. If not I go back, take the next smaller number and check again. But i notice that my idea is not use dynamic programming. This was my only idea.</p>
  
  <p>I hope you can help me.</p>