Python3 | Solved Using Binary Search W/ Sorting O((n+m)*logn) Runtime Solution!
```\nclass Solution:\n    #Time-Complexity: O(n + nlogn + n + mlog(n)) -> O((n+m) *logn)\n    #Space-Complexity: O(n)\n    def maxProfitAssignment(self, difficu
```\nclass Solution:\n    #Time-Complexity: O(n + nlogn + n + mlog(n)) -> O((n+m) *logn)\n    #Space-Complexity: O(n)\n    def maxProfitAssignment(self, difficulty: List[int], profit: List[int], worker: List[int]) -> int:\n        #Approach: First of all, linearly traverse each and every corresponding index\n        #position of first two input arrays: difficulty and profit to group each\n        #item by 1-d array and put it in separate 2-d array. Then, sort the 2-d array\n        #by increasing difficulty of the job! Then, for each worker, perform binary\n        #search and consistently update the max profit the current worker can work and\n        #earn! Add this value to answer variable, which is cumulative for all workers!\n        #this will be the result returned at the end!\n        arr = []\n        for i in range(len(difficulty)):\n            arr.append([difficulty[i], profit[i]])\n        #sort by difficulty!\n        arr.sort(key = lambda x: x[0])\n        #then, I need to update the maximum profit up to each and every item!\n        maximum = float(-inf)\n        for j in range(len(arr)):\n            maximum = max(maximum, arr[j][1])\n            arr[j][1] = maximum\n        ans = 0\n        #iterate through each and every worker!\n        for w in worker:\n            bestProfit = 0\n            #define search space to perform binary search!\n            L, R = 0, len(arr) - 1\n            #as long as search space has at least one element to consider or one job,\n            #continue iterations of binary search!\n            while L <= R:\n                mid = (L + R) // 2\n                mid_e = arr[mid]\n                #check if current job has difficulty that is manageable!\n                if(mid_e[0] <= w):\n                    bestProfit = max(bestProfit, mid_e[1])\n                    #we still need to search right and try higher difficulty\n                    #jobs that might yield higher profit!\n                    L = mid + 1\n                    continue\n                else:\n                    R = mid - 1\n                    continue\n            #once we break from while loop and end binary search, we should have\n            #found bestProfit for current worker performing task that is manageable!\n            ans += bestProfit\n        return ans
['Sorting', 'Binary Tree', 'Python3']