Please help, getting input in answer

import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner scn = new Scanner(System.in);
String input = scn.next();

	ArrayList<String> aasd =Dictionary(input);
	disp(aasd,input);
	
	
}

static ArrayList<String> Dictionary(String input) {
	
	if(input.length()==0) {
		
		ArrayList<String> base = new ArrayList();
		base.add(" ");
		
		return base ;
	}
	
	
	ArrayList<String> an = new ArrayList();
	char ch = input.charAt(0);
	String asd = input.substring(1);
	ArrayList<String> wq = Dictionary(asd);
	
	for(String dsaas : wq) {
		
		
		for(int i=0;i<dsaas.length();i++) {
			String asdas = dsaas.substring(0, i)+ch+dsaas.substring(i);
			an.add(asdas);
		}
	}

	return an;
	
}

static void disp(ArrayList<String> aasd, String input) {
	
	for(int i=0; i<aasd.size();i++) {
		String asdasd = aasd.get(i);
		if(asdasd.compareTo(input)>0) {
			
			System.out.println(aasd.get(i));
		}
			
	}
}

}

the problem is in condition of this loop . the condition should include equal sign as well i.e. i<=dsaas.length() as to include the word which has ch as the last character.

Thanks.

Still not getting result

please send me the testcase that fails here.
Thanks

All TestCase fail, please try to run my solution

so here you need to fix two things.

  1. the strings in the output must be strictly larger than the given string, it means given string should not be part of your output.
  2. sort the output.

Thanks

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.