More algos from hackerrank