src/Recursion_Course/recursion_get.java
public static ArrayList<String> boardPath(int curr, int end) {

		if (curr == end) {
			ArrayList<String> br = new ArrayList<String>();
			br.add("\n");
			return br;
		}

		if (curr > end) {
			ArrayList<String> nr = new ArrayList<String>();
			return nr;
		}

		ArrayList<String> mr = new ArrayList<String>();

		for (int dice = 1; dice <= 6; dice++) {
			ArrayList<String> rr = boardPath(curr + dice, end);

			for (String val : rr) {
				mr.add(val + dice);
			}
		}

		return mr;

	}
//	print all the possible board paths (diagonals of square mtx) from current to end
print all the possible board paths (diagonals of square mtx) from current to end
print all the possible board paths ( diagonals of square mtx ) from current to end
public static ArrayList<String> boardPath(int curr, int end) {
		if (curr == end) {
			ArrayList<String> br = new ArrayList<String>();
			br.add("\n");
			return br;
		}
		if (curr > end) {
			ArrayList<String> nr = new ArrayList<String>();
			return nr;
		}
		ArrayList<String> mr = new ArrayList<String>();
		for (int dice = 1; dice <= 6; dice++) {
			ArrayList<String> rr = boardPath(curr + dice, end);
			for (String val : rr) {
				mr.add(val + dice);
			}
		}
		return mr;
	}
public static ArrayList < String > boardPath ( int curr , int end ) { if ( curr == end ) { ArrayList < String > br = new ArrayList < String > ( ) ; br . add ( "\n" ) ; return br ; } if ( curr > end ) { ArrayList < String > nr = new ArrayList < String > ( ) ; return nr ; } ArrayList < String > mr = new ArrayList < String > ( ) ; for ( int dice = 1 ; dice <= 6 ; dice ++ ) { ArrayList < String > rr = boardPath ( curr + dice , end ) ; for ( String val : rr ) { mr . add ( val + dice ) ; } } return mr ; }
print all the possible board paths (diagonals of square mtx) from current to end
print all the possible board paths ( diagonals of square mtx ) from current to end