Added solution for Hackerrank's BotSavesPrincess
Added a memoization decorator to the python template