C ++ program to print all palindromic paths from top left to bottom right in a grid .
#include <bits/stdc++.h> NEW_LINE using namespace std ; #define N  4 NEW_LINE bool isPalin ( string str ) { int len = str . length ( ) / 2 ; for ( int i = 0 ; i < len ; i ++ ) { if ( str [ i ] != str [ str . length ( ) - i - 1 ] ) return false ; } return true ; }