Uploaded version to hackerrank.com