Java Solution | O(n) time || O(1) space || Simplest and Easy
```java \nclass Solution {\n    public int minNumberOfHours(int inEnergy, int inExp, int[] energy, int[] experience) {\n        int TE=0;  //Total Energy of Opp
```java \nclass Solution {\n    public int minNumberOfHours(int inEnergy, int inExp, int[] energy, int[] experience) {\n        int TE=0;  //Total Energy of Opponents\n        int addExp=0;  // Additional Exp required\n        for(int i=0;i<energy.length;i++)\n        {\n            TE+=energy[i];    // Adding energy of each opponent to Total Energy\n            if(inExp>experience[i])\n                inExp+=experience[i];   //Updating Initial Experience\n            else{\n                addExp+=experience[i]-inExp+1;  //Calculating Additional Exp. required to beat opponent \n                inExp+=experience[i]+addExp;   //Updating Initial Experience\n            }\n        }\n        if(TE>=inEnergy)\n            return addExp + TE-inEnergy+1;    //Training Hours = additional Exp + additional Energy Required\n        else\n            return addExp;  \n    }\n}
[]