Error for scanner

Whats wrong, why this error

hello @nikhiv6

put ur code inside main class.

ie write ur code inside this main class->

Check now, re-saved. Again same error

while(sc.hasNextLine()) {
  inputLine = sc.nextLine();
  //parse inputLine however you want, and add to your vector
}

use this type of snippet for reading unknown number of lines

THanks, now TC failing, can I know failed test case reason. Saved again

pls share ur updated code

Sorry. Saved again now, pls check

image

u need to print lexigraphically minimum .
once check the video solution for this problem

Oh, totally misunderstood this problem, thanks Aman will check the video

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.