My solution for the Evernote Coding Challenge on HackerRank