Playing Hacks and Stuffs!
Solve Script: link
Not so efficient as the time complexity is O(N^2) :(
O(N^2)