StckOveflow : GetBoardPath

When i run this function, I am getting Stackoverflow exception.I am not able to find the reason. I am getting exception where i am calling recursive function.

public static ArrayList getBoardPath(int start,int end) {

	if(start > end){
		ArrayList<String> baseResult = new ArrayList<>();
		return baseResult;
	}
	
	if(start == end){
		ArrayList<String> baseResult = new ArrayList<>();
		baseResult.add("");
		return baseResult;
	}
	
	ArrayList<String> currentResult = new ArrayList<>();
	for(int dice=0; dice<=6; ++dice) {
		ArrayList<String> recResult = getBoardPath(start+dice,end);
		for( String oneOfTheCombination : recResult ){
			currentResult.add(dice + oneOfTheCombination);
		}				
	}
				
	
	return currentResult;
}

Hey @connectrajanjain Send me the call that you have made from Main method.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.