Hackerrank Multiset Implementation Program