[Python 3] DFS + Binary search, 32ms
```\ndef minSessions(self, tasks: List[int], sessionTime: int) -> int:\n        def dfs(i):\n            if i == len(tasks):\n                return True\n     
```\ndef minSessions(self, tasks: List[int], sessionTime: int) -> int:\n        def dfs(i):\n            if i == len(tasks):\n                return True\n            for j in range(mid):\n                if cnt[j] >= tasks[i]:\n                    cnt[j] -= tasks[i]\n                    if dfs(i + 1):\n                        return True\n                    cnt[j] += tasks[i]\n                    if cnt[j] == sessionTime:\n                        break\n            return False                    \n        \n        l, r = 1, len(tasks)\n        tasks.sort(reverse=True)\n        while l < r:\n            mid = (l + r) // 2\n            cnt = [sessionTime] * mid\n            if not dfs(0):\n                l = mid + 1\n            else:\n                r = mid\n        return l
['Binary Tree', 'Python']