Loc June 2017 challenge KCHAR

I tried to solve the KCHAR.

Link to the Question : KCHAR

Link to my solution : link

Although my solution is giving correct answer for all test cases I have tried, it’s still showing WA.
Please provide some test cases where it might be failing.

Thank you :slight_smile:

Your code fails for this

1

6

Expected output:a

Your output:c

But the answer is not a. As the string given in question also contains c at 6th position. S3 = “aacaacc”

Your solution got AC when i submitted in practice link. Please re-check :confused:

I have already wasted my 20 minutes finding where the mistake is, now i am reading ur comment :(…

I am in a worse state than you :frowning: