String ros = str.substring(1);
ArrayList myresult = new ArrayList<>();
ArrayList recresult = getSS(ros);
Please explain whats the meaning of substring(1) and why we take it and the next two lines.this is from RECURSION get subsequences
hello @amankat
substirng(1) simply means that we take subpart of string starting with index 1.
for example let the string str be “AMANKAT”
if we write str.substring(1) the we get “MANKAT”.
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.