Doubt regarding test-cases in problem- The maximum substring of August Easy Hackerearth

Link to the problem on Hackerearth
If we take the string as “apyzayz” , I think the output should be “yz” . But some solutions getting “a” as the output for this testcase, got an AC solution.
When I ran @aryanc403 's solution (Screenshot below) against the provided custom input, it gave the answer as “a”. Link to the solution

Next ambiguity I feel is that for the input as “xyzabcabcxyz”, the correct answer should be “xyz” as the question says “print the one with the minimum index of the first occurrence.” But there are many solutions which are giving “abc” as the output and still got AC. Link to one such solution
@aryanc403 Please correct me if I am wrong.

Welcome to hackerearth. :slight_smile:


sad :frowning:

it’s hackerearth my friend :grinning: