I am not able to sort the array list please check my code.
Error in the code
@Adhyayan Your code wasn’t even giving correct subsequence. It was giving 2 subs for ab, which should be 4(2 pow n).
Instead of char cc, you took int cc, also wrote a return statement in loop.
For sorting arraylist use Collections.sort(list).
I have corrected your code.
Check it. If any doubt ask me else resolve the doubt and rate full.
Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
this error is coming.
Always make arraylist with angular brace in object. Arraylist are = new Arraylist<>();
And submit the code I corrected, it passed all test cases.