filmov
tv
Count of Interesting Subarrays | Using Studied Concept | Dry Run | Leetcode 2845 | codestorywithMIK

Показать описание
Hi Everyone, this is the 149th video of our Playlist "Arrays 1D/2D : Popular Interview Problems".
Now we will be solving a good array prefix-sum problem - Count of Interesting Subarrays | Using Studied Concept | Detailed | Dry Run | Leetcode 2845 | codestorywithMIK
We will solve it using the same concept as Leetcode-974. We will do a recap and build intuition and solve it easily.
Problem Name : Count of Interesting Subarrays | Using Studied Concept | Detailed | Dry Run | Leetcode 2845 | codestorywithMIK
Company Tags : will update later
╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
Video Summary :
The problem asks us to count subarrays where the number of elements satisfying nums[i] % modulo == k is congruent to k modulo modulo. We keep a running count (sum) of such elements and use the modulo of this sum to track patterns. By using a hash map to store the frequency of each modulo result, we efficiently count the number of valid subarrays ending at each index. The key trick is recognizing that if (sum[i] - sum[j]) % modulo == k, then we can rearrange this to find how many previous prefix sums satisfy that condition.
✨ Timelines✨
00:00 - Introduction
0:35 - Motivation
1:04 - Problem Explanation
5:13 - Thought Process behind counting
17:26 - Recap Leetcode - 974 and Maths Proof
28:28 - Dry Run
34:42 - Coding it up
#MIK #mik #Mik
#coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #hindiexplanation #hindiexplained #easyexplaination #interview#interviewtips #interviewpreparation #interview_ds_algo #hinglish #github #design #data #google #video #instagram #facebook #leetcode #computerscience #leetcodesolutions #leetcodequestionandanswers #code #learning #dsalgo #dsa #coding #programming #100daysofcode #developers #techjobs #datastructures #algorithms #webdevelopment #softwareengineering #computerscience #pythoncoding #codinglife #coderlife #javascript #datascience #leetcode #leetcodesolutions #leetcodedailychallenge #codinginterview #interviewprep #technicalinterview #interviewtips #interviewquestions #codingchallenges #interviewready #dsa #hindi #india #hindicoding #hindiprogramming #hindiexplanation #hindidevelopers #hinditech #hindilearning #helpajobseeker #jobseekers #jobsearchtips #careergoals #careerdevelopment #jobhunt #jobinterview #github #designthinking #learningtogether #growthmindset #digitalcontent #techcontent #socialmediagrowth #contentcreation #instagramreels #videomarketing #codestorywithmik #codestorywithmick #codestorywithmikc #codestorywitmik #codestorywthmik #codstorywithmik #codestorywihmik #codestorywithmiik #codeistorywithmik #codestorywithmk #codestorywitmick #codestorymik #codestorwithmik
Комментарии