hacker rank challenges solution