Count Subarrays With Majority Element I, II | LeetCode 3737, 3739 | C++ | Arabic

Today's Challenge: • 3737. Count Subarrays With Majority Element I • 3739. Count Subarrays With Majority Element II In this video, we break down the intuition and approach step-by-step for both versions of the problem: "Count Subarrays With Majority Element I" and "Count Subarrays With Majority Element II". We start from the brute force and optimize our way to the optimal O(N) solution without memorizing code. Code & Written Editorial: https://github.com/HassanFouad/LeetCo... Timestamps: 0:15 Problem Description 1:13 Understanding Examples 2:29 Solution Approach 5:15 O(N^2) solution 10:40 Count Subarrays With Majority Element II Full Explanation 11:11 O(n log n) solution 21:43 O(N) solution Join Our Community WhatsApp Group for daily challenges and coding discussions: https://chat.whatsapp.com/Kuwlzu90GKq... Problem Solving Roadmap A structured guide covering essential Data Structures & Algorithms topics for practice: https://docs.google.com/spreadsheets/... Main Repository Source code for all daily challenges: https://github.com/HassanFouad/LeetCo... Connect With Me • LinkedIn:   / hassan-fouad-a97b79291   • LeetCode: https://leetcode.com/u/Hassan_Fouad/ • Codeforces: https://codeforces.com/profile/Hassan... • YouTube:    / @hassan_fouad   If you found this helpful, please consider subscribing to follow the daily challenges.