Hello …
I am trying to solve this question from hackerearth…
I got only a brute force idea…
So i tried to look into other’s solution…
This solution … https://www.hackerearth.com/submission/52006916/
I tried to understand but couldn’t.
Can you explain what kind of algorithm is being used or what is the logic.
Thanks
