I am getting WA verdict in this problem and am unable to figure out why! It would be great if someone can point out the flaw in my approach or suggest correct approach. Here’s the link to my code : Link Thanks
Please help somebody!