✅Time O(N) && Space O(1) :: easy to understand
\nclass Solution {\npublic:\n    int minNumberOfHours(int ene, int exp, vector<int>& a, vector<int>& b) {\n        //calculating energy\n        int energy;\n  
```\nclass Solution {\npublic:\n    int minNumberOfHours(int ene, int exp, vector<int>& a, vector<int>& b) {\n        //calculating energy\n        int energy;\n        for(auto it:a)\n            ene-=it;\n        energy=(ene>0)?0:abs(ene)+1;\n        \n        //calculating exp\n        int experience =0;\n        for(auto it:b)\n            if(exp>it)exp+=it;\n            else experience +=it-exp+1,exp+=it+experience ;\n        \n        return energy+experience ;\n    }\n};\n```
['C']