Python Solution Explained
\'\'\'\n\n    def successfulPairs(self, spells: List[int], potions: List[int], s: int) -> List[int]:\n        q=[]\n        potions.sort()                      
\'\'\'\n\n    def successfulPairs(self, spells: List[int], potions: List[int], s: int) -> List[int]:\n        q=[]\n        potions.sort()                                      #Sort the potion array\n        a=len(potions)\n        for i in spells:\n            count=0\n            l=0                                   #We have to find a value which is less than (success/i) in sorted array  \n             r=len(potions)                # binary seach will give index of that point and onwards that index all are \n            x=s/i                                #greater values \n            while l<r:\n                mid=l+(r-l)//2\n                if potions[mid]>=x:\n                    r=mid\n                else:\n                    l=mid+1\n            \n            count=(a-l)                                      #Last - index that came with binary search\n            q.append(count)\n        return q\n\'\'\'
['Binary Search', 'Tree', 'C', 'Python']