answer to hacker rank problems