We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
My solution gets the right answer in the first test case (writing in Python), but I'm having trouble making it efficient enough to not time out. Would anyone have any tips?
My solution involves creating a second list of possible experience points for each situation depending on if Garnet and her pet eat 0 to N mandragoras, then prints the maximum value in the list.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Mandragora Forest
You are viewing a single comment's thread. Return to all comments →
My solution gets the right answer in the first test case (writing in Python), but I'm having trouble making it efficient enough to not time out. Would anyone have any tips?
My solution involves creating a second list of possible experience points for each situation depending on if Garnet and her pet eat 0 to N mandragoras, then prints the maximum value in the list.