Why I am getting wrong answer?What is wrong in the implementation?

This post was flagged by the community and is temporarily hidden.