✅Easiest & Best Solution in C++ || BinarySearch✅
Complexity\n- Time complexity:\nO(nlogm)\n\n- Space complexity:\nO(1)\n\n# Code\nPlease Upvote if u liked my Solution\uD83D\uDE42\n\nclass Solution {\npublic:\n
# Complexity\n- Time complexity:\nO(nlogm)\n\n- Space complexity:\nO(1)\n\n# Code\n**Please Upvote if u liked my Solution**\uD83D\uDE42\n```\nclass Solution {\npublic:\n    vector<int> successfulPairs(vector<int>& spells, vector<int>& potions, long long success) {\n        int n=spells.size(),m=potions.size();\n        vector<int> pairs;\n        sort(potions.begin(),potions.end());\n        for(int i=0;i<n;i++){\n            if(spells[i]>=success){\n                pairs.push_back(m);\n                continue;\n            }\n            int ll=0,ul=m-1,mid;\n            while(ll<=ul){\n                mid =ll+(ul-ll)/2;\n                long long product=(long long)potions[mid]*spells[i];\n                if(product>=success)\n                    ul=mid-1;\n                else\n                    ll=mid+1;\n            }\n            pairs.push_back(m-ll);\n        }\n        return pairs;\n    }\n};\n```\n**Happy LeetCoding\uD83D\uDCAF\nPlease Upvote**
['Array', 'Two Pointers', 'Binary Search', 'Sorting', 'C++']