[Python3] Simple | Fastest
Logic: We need to pick the class whose pass ratio will increase the most when we add 1 extraStudent. We need to repeat this for every extraStudent\n\nclass Solu
Logic: We need to pick the class whose pass ratio will increase the most when we add 1 extraStudent. We need to repeat this for every extraStudent\n```\nclass Solution:\n    def maxAverageRatio(self, classes: List[List[int]], extraStudents: int) -> float:\n        h = []\n        ones = 0\n        for a,b in classes:\n            if a==b:\n                ones += 1\n                continue\n            heapq.heappush(h, [-(((a+1)/(b+1)) - (a/b)), b, a])\n        \n        # Base case average pass ratio is 1.0\n        if not h: return 1.0\n        \n        for _ in range(extraStudents):\n            _, y,x = heappop(h)\n            heapq.heappush(h, [-(((x+2)/(y+2)) - ((x+1)/(y+1))), y+1, x+1])\n            \n        return (sum(x/y for _, y, x in h)+ones) / len(classes)\n```
[]