Successful Pairs of Spells and Potions
Medium · Binary Search · about 15 minutes
Asked at Amazon, Google, Microsoft, Meta.
A spell and a potion form a successful pair if spell * potion >= success. Return, for each spell, the number of potions it pairs successfully with.