C++||Most Easy Binary Search Solution
\nclass Solution {\npublic:\n    vector<int> maximumBeauty(vector<vector<int>>& items, vector<int>& queries) {\n        sort(items.begin(),items.end());\n      
```\nclass Solution {\npublic:\n    vector<int> maximumBeauty(vector<vector<int>>& items, vector<int>& queries) {\n        sort(items.begin(),items.end());\n        map<int,int> mp;\n        int maxi=INT_MIN;\n        int n=items.size();\n        mp[0]=0;\n        for(int i=0;i<n;i++)\n        {\n            maxi=max(maxi,items[i][1]);\n            mp[items[i][0]]=maxi;\n        }\n        vector<int> ans;\n        for(int i=0;i<queries.size();i++)\n        {\n            auto it=mp.lower_bound(queries[i]);\n            if(mp.find(queries[i])!=mp.end())\n            ans.push_back((*it).second);\n            else\n            {\n                *it--;\n                ans.push_back((*it).second);\n            }\n        }\n        return ans;\n    }\n};\n```
['Binary Tree']