This post is by a banned member (cuminarid) - Unhide
Code:
class Solution { public: bool isZeroArray(vector<int>& nums, vector<vector<int>>& queries) { int n=nums.size(); vector<int>freq(n+1,0); for(auto i:queries){ freq[i[0]]++; freq[i[1]+1]--; } int op=0; for(int i=0;i<n;i++){ op+=freq[i]; if(op<nums[i])return false; } return true; } };
This post is by a banned member (srweddf) - Unhide
This post is by a banned member (a7anekk135) - Unhide
This post is by a banned member (Ivantoney9) - Unhide
This post is by a banned member (xuser69) - Unhide
(Yesterday - 06:04 PM)rustynail69 Wrote: Show Moresponsored by: Nardo.fo visit for High Quality Logs, Use Code: Rusty for 20% OFF
MY OTHER POSTS HERE
ty
This post is by a banned member (catiofree) - Unhide
(Yesterday - 06:04 PM)rustynail69 Wrote: Show Moresponsored by: Nardo.fo visit for High Quality Logs, Use Code: Rusty for 20% OFF
MY OTHER POSTS HERE
Shukran
This post is by a banned member (CAKIZYZ) - Unhide
This post is by a banned member (ciauru) - Unhide