Hacker rank solutions