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.
The problem is also just written poorly, like MANY others on this website. The author writes of flower number i, where he/she presumably means flower type i, since we also have N, the number of flowers we want to buy. The problem further does not state the implicit assumption that the group can buy any N flowers (type doesn't matter).
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Greedy Florist
You are viewing a single comment's thread. Return to all comments →
The problem is also just written poorly, like MANY others on this website. The author writes of flower number i, where he/she presumably means flower type i, since we also have N, the number of flowers we want to buy. The problem further does not state the implicit assumption that the group can buy any N flowers (type doesn't matter).