String Window | Understanding Problem Statement

If we have two inputs shown below

String input1 = “qweaty asdfgh qazxsw”;

String input2 = “qas”;

Q1->Is this result correct correct ???

Result = “qweaty as”,“qazxs”;


String input1 = “qweatys adfgh qazxsw”;

String input2 = “qas”;

Q2->Is this result correct correct ???

Result = “qweatys”,“qazxs”;


Q3->Can you also provide any corner cases which have been missed ?

Hey @connectrajanjain You have correctly got all the possible results just we have to give smallest possible among them.

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.