Easy Solved........🔥🔥🔥🔥
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: 100%\u2705\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 []\nauto speedUp = []() {\n    ios_base::sync_with_stdio(false);\n    cin.tie(nullptr);\n    cout.tie(nullptr);\n    return 0;\n}();\n\nclass Solution {\npublic:\n    int minSubarray(vector<int> &nums, int p) {\n        int n = nums.size();\n        long totalrem = accumulate(nums.begin(), nums.end(), 0l) % p;\n        if(totalrem == 0) {\n            return 0;\n        }\n        unordered_map<int, int> presums;\n        presums[0] = -1;\n        long sum = 0;\n        int minlen = INT_MAX;\n        for(int i = 0; i < n; i++) {\n            sum += nums[i];\n            long rem = sum % p;\n            long target = (((rem - totalrem) % p) + p) % p;\n            if(presums.contains(target)) {\n                minlen = min(i - presums[target], minlen);\n            }\n            presums[rem] = i;\n        }\n        return (minlen == INT_MAX or minlen == n) ? -1 : minlen;\n    }\n};\n```
['Array', 'Hash Table', 'C', 'Prefix Sum', 'C++']