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.
Two issues:
1. At each iteration, you need to eliminate the "day 1" plants from the "list" variable before you look in the "stack"
2. Your temp variable is losing history - it needs to account for how big the stack had gotten and by how much it went down (you are only doing the latter)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Poisonous Plants
You are viewing a single comment's thread. Return to all comments →
Two issues: 1. At each iteration, you need to eliminate the "day 1" plants from the "list" variable before you look in the "stack" 2. Your temp variable is losing history - it needs to account for how big the stack had gotten and by how much it went down (you are only doing the latter)