Easy to understand Python solution |100% faster|
\n\n...\nclass Solution:\n\n    def minNumberOfHours(self, initialEnergy: int, initialExperience: int, energy: List[int], experience: List[int]) -> int:\n      
![image](https://assets.leetcode.com/users/images/947cdd5a-5dd0-487e-b98e-364b937a6be9_1661076362.0836651.png)\n\n...\nclass Solution:\n\n    def minNumberOfHours(self, initialEnergy: int, initialExperience: int, energy: List[int], experience: List[int]) -> int:\n        #Base Case\n        if sum(energy) < initialEnergy and sum(experience) < initialExperience:\n            return 0\n        \n        \n        z = []\n        count = 0\n        y = 0\n        \n        # initial check\n        z.append(initialExperience)\n        if z[0] < experience[0]:\n            t = experience[0]-z[0]+1\n            y+=t\n            z[0] = t + z[0]\n            \n            \n        if z[0] == experience[0]:\n            t = experience[0]-z[0]+1\n            y+=t\n            z[0] = t + experience[0]\n            \n\n        z[0] = z[0]+experience[0]\n        \n\n        if len(experience)==1 and sum(energy) < initialEnergy:\n            return y\n\n        \n        # number of hours to get sufficient experience   \n        for i in range(1,len(experience)):\n            if z[0] < experience[i]:\n                t = experience[i]-z[0]+1\n                y+=t\n                z[0] = t + z[0]\n                \n            if z[0] == experience[i]:\n                t = experience[i]-z[0]+1\n                y+=t\n                z[0] =t + experience[1]\n            \n            z[0] = z[0]+experience[i]\n            \n            \n        \n        # calculating number of hours to fulfill energy requirement \n        x = sum(energy) - initialEnergy + 1\n        \n        # returning total number of hours\n        return x+y\n\t\t\n...
['Array', 'Python']