From aafb4c2426f40602adcdf1f35727dd000ea637a4 Mon Sep 17 00:00:00 2001 From: chayan das Date: Fri, 25 Apr 2025 22:53:21 +0530 Subject: [PATCH] Create 2845. Count of Interesting Subarrays --- 2845. Count of Interesting Subarrays | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 2845. Count of Interesting Subarrays diff --git a/2845. Count of Interesting Subarrays b/2845. Count of Interesting Subarrays new file mode 100644 index 0000000..b6864d6 --- /dev/null +++ b/2845. Count of Interesting Subarrays @@ -0,0 +1,17 @@ +class Solution { +public: + long long countInterestingSubarrays(vector& nums, int modulo, int k) { + int n = nums.size(); + unordered_map fre; + fre[0]=1; + long long ans =0; + int cnt =0; + for(int r=0; r