Beats 93.22% in C++ | Binary Search Algorithm
Code\ncpp []\nclass Solution {\npublic:\n    vector<int> successfulPairs(vector<int>& spells, vector<int>& potions, long long success) {\n        \n        int 
# Code\n```cpp []\nclass Solution {\npublic:\n    vector<int> successfulPairs(vector<int>& spells, vector<int>& potions, long long success) {\n        \n        int n = spells.size();\n        int m = potions.size();\n        vector<int> pairs;\n\n        sort(potions.begin(), potions.end());\n\n        for(int i = 0; i < n; i++)\n            pairs.push_back(m - (lower_bound(potions.begin(), potions.end(), (double)success / spells[i]) - potions.begin()));\n\n        return pairs;\n    }\n};\n```
['Binary Search', 'Sorting', 'C++']