Python short 2 pointer solution & some thoughts
Some food for thoughts: Why don\'t we try to match highest people[r] with possibly maximum people[l] instead of smallest people[l]? All these greedy solutions s
Some food for thoughts: Why don\'t we try to match highest people[r] with possibly maximum people[l] instead of smallest people[l]? All these greedy solutions seem fishy, intiutively.\n```\nclass Solution:\n    def numRescueBoats(self, people, limit):\n        people.sort()\n        l, n = 0, len(people)\n        for r in range(n - 1, -1, -1):\n            if people[l] + people[r] <= limit: l += 1\n            if l >= r: return n - r\n```
[]