I have tested the code with different inputs and it gives the right output but not passing the most tests in codegym. I also tried changing List<String> to ArrayList<String> in the instant variable still no luck. Anybody please explain what I am doing wrong here? Thanks.