Why this error is coming :

*** Error in `./solution’: double free or corruption (out): 0x00000000012261d0 ***
Aborted

No where my program is accessing out of bound index. Also all custom test cases are running as well as the test case for which this error is coming, is also running fine as custom test case.

Click here to start solving coding interview questions