code on hack rank