In this problem I have discussed two solution for the given problem one with O(nlogn) and other with O(n)
code- O(n) : https://gist.github.com/Kuldip-G/e7d0...
code- O(nlogn) : https://gist.github.com/Kuldip-G/c9b2...
#Hackerrank #NewYearChaos #Solution