Simple Commented C++ | Binary Search
```\nclass Solution {\npublic:\n    vector successfulPairs(vector& spells, vector& potions, long long success) {\n        // Sort the potions array as we will u
```\nclass Solution {\npublic:\n    vector<int> successfulPairs(vector<int>& spells, vector<int>& potions, long long success) {\n        // Sort the potions array as we will use binary search here...\n        sort(potions.begin(),potions.end());\n        \n        // Declaring the answer array...\n        vector<int> ans(spells.size(),0);\n        \n        for(int i = 0; i < spells.size(); i++){\n            long long n = spells[i];\n            \n            // the required element can be calculated as follows...\n            long long int req = (success/n) + (success%n != 0);\n            \n            // if the required element is found then all the elements greater than "req" will satisfy the condition...\n            int indx = lower_bound(potions.begin(),potions.end(),req) - potions.begin();\n            \n            // taking all elements greater than  and equal to "req"...\n            ans[i] = potions.size() - indx;\n            \n        }\n        \n        return ans;\n        \n    }\n};
['C', 'Binary Tree']