code:https://ide.codingblocks.com/s/225072
ques:https://online.codingblocks.com/app/player/74266/content/76621/5364/code-challenge
2 test case not passing
@bhaskar0_0
there is one mistake in your code, when comparing your are doing mp[n]!=(i-n) it should be mp[i]!=(i-n) . There are some other mistakes in maintaining the variables.
I have done the required changes and comment it in the code because this is easy to explain through code.
Please have a look at this https://ide.codingblocks.com/s/225345.
I hope it will be clear from this.
Feel free to ask.
Also if the query is solved, then please mark this doubt as resolved.