i suggest pen paper lo trace kro ho jayega, 1st test case ko trace kro kitne chaheye aur wo dekho :D
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    int minNumberOfHours(int ie, int iexp, vector<int>& e, vector<int>& exp) {\n\n        int sume=0;\n        int sumexp=0;\n\n        int oe=ie;\n        int oexp=iexp;\n        int temp;\n\n        for(int i=0;i<e.size();i++)\n        {\n            if(ie<=e[i])\n            {\n            temp=ie;\n            ie=e[i]+1;\n            sume=sume+ie-temp;\n            }\n            if(iexp<=exp[i])\n            {  \n         temp=iexp;\n            iexp=exp[i]+1;\n            sumexp=sumexp+iexp-temp;\n            }\n            ie=ie-e[i];\n            iexp=iexp+exp[i];\n        }\n\n        return sume+sumexp;\n        \n    }\n};\n```
['C++']