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.
Iterating from right to left works. But one needs to take care of only killing those plants that are killable (i.e. exposed to a plant with lower pesticide levels) at a given point in time (and "waiting" until the plant become killable).
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 →
Iterating from right to left works. But one needs to take care of only killing those plants that are killable (i.e. exposed to a plant with lower pesticide levels) at a given point in time (and "waiting" until the plant become killable).