Editorial is wrong

In subseq function, in the foreach loop the object valrial is used as string which is the wrong implementation

@Predator
The ArrayLists are made of strings

ArrayList<string>

Hence the for each loop is correct.
You may not have been able to see the string type written due to a markdown rendering issue. I have updated the editorial. Kindly check it out again.

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.