Check if the left move is valid
if ( isSafe ( row , col - 1 , m , n , visited ) ) { path += ' L ' ; printPathUtil ( row , col - 1 , m , n , visited ) ; path = path . substring ( 0 , path . length ( ) - 1 ) ; }