New Companies Hackerrank Solution