[Py3/Py] Simple solution w/ comments
NOTE: Use cache instead of lru_cache for memoization\n> \n\n\n\nfrom math import inf\nfrom functools import cache\n\nclass Solution:\n    def minSessions(self, 
> NOTE: Use cache instead of lru_cache for memoization\n> \n\n\n```\nfrom math import inf\nfrom functools import cache\n\nclass Solution:\n    def minSessions(self, tasks: List[int], sessionTime: int) -> int:\n        \n        # Init\n        n = len(tasks)\n        \n        @cache # NOTE: here use cache instead of lru_cache, otherwise TLE is encountered\n        def recursion(mask, availableTime):\n            \n            # If all tasks are completed\n            # return 0, as no session is\n            # needed for anything to complete\n            if mask == (1<<n) - 1:\n                return 0\n            \n            else:\n                \n                # Init\n                sessions = inf\n                \n                # Loop for each tasks and get minimum number of\n                # sessions required to complete them\n                for i in range(n):\n                    \n                    # Check if the current task is not yet complete\n                    if not (mask & (1<<i)):\n                        \n                        # if task can be completed in available time of the current session\n                        if tasks[i] <= availableTime:\n                            \n                            # Mark the current task complete, and update the available time\n                            num_sessions = recursion(mask | (1<<i), availableTime-tasks[i])\n                            \n                        else: # if task can\'t be completed in available time of the current session\n                            \n                            # Add new session to complete the current task\n                            # Mark the current task complete, and update the available time\n                            # in the new session\n                            num_sessions = 1 + recursion(mask | (1<<i), sessionTime-tasks[i])\n                        \n                        # Update minimum number of sessions needed\n                        sessions = min(sessions, num_sessions)\n                \n                # return minimum no. of sessions needed\n                return sessions\n        \n        return recursion(0,0)        \n```
['Dynamic Programming', 'Bit Manipulation']