Backtracking problem is not easier to understand. For an average programmer practice is the only way to become an expert at backtracking problem solution. The article  “Smart Frog codechef problem solution by  backtracking” is one of the good problem to practice backtracking problem. The problem link  https://www.codechef.com/problems/G2.

Smart Frog codechef problem solution by backtracking

Problem description for Smart Frog codechef:

  • We need to find max number of cells that the smart frog can jump into.
  • Jump to the right to a cell in the same row, provided that the number written in that cell is not smaller than the number written in the current cell.
  • Jump downwards to a cell in the same column, provided that the number written in that cell is not greater than the number written in the current cell.