Gettig wrong answer in DIVGOLD

link is http://ideone.com/BeQeYV

Could you please comment your algorithm?

1 Like

Wrong answer for this test case

6

ZAZAZA

Answer should be “AZAZAZ” , you code is giving “AAZAZA”(one Z is missing). HERE.

1 Like

when ever you ask question about error in your code, please either provide comments in code or explain your algorithm so that others can get knowledge what was your logic, as it makes easier for one to debug the code… :slight_smile:

3 Likes

For DABC the answer should be ABCD but your code is giving AABCD…