Time limit exceed is coming ,could you please help to remove that . here is my code

/******************************************************************************

                        Online Java Compiler.
            Code, Compile, Run and Debug java program online.

Write your code in this editor and press “Run” button to execute it.

******************************************************************************/
import java.util.
;
public class Main
{
static String s = “”;
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String str = scan.next();
// int[] arr = new int[N];
// for(int i=0;i<N;i++){
// arr[i] = scan.nextInt();
// }
// int T = scan.nextInt();
//int[] arr ={10,1,2,7,6,1,5};
//String str = “ABA”;
char[] cc = new char[str.length()];
for(int i=0;i<str.length();i++){
cc[i] = str.charAt(i);
}
Arrays.sort(cc);
String s = “”;
for(char c : cc){
s = s+c;
}

//	System.out.println(s.substring(0));
	TrickyPer(s,"");
	
	
}
	public static void TrickyPer(String que,String res){
	    if(que.length() == 0){
	        if(!s.contains(res)){
	            System.out.println(res);
	            s=s+res+";";
	        }
	        
	        return;
	    }
    for(int i=0;i<que.length();i++){
        char c = que.charAt(i);
        String str = que.substring(0,i)+que.substring(i+1);
        TrickyPer(str,res+c);
    }
   }

}

Hi @uttamjaish
Please share your code using coding blocks ide so that i can easily run your code and help you in better efficient way.

what is coding blocks ide and how to share it. could u please guide me ?

@uttamjaish
Just google coding blocks ide and then copy paste your code there and in the navigation bar in navigation bar go to file and save the code and share the link with me then.

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.

could you please provide me the better soln , 1 test case is not passed