Solutions from hackerranks