Day 11 of learning Dsa patterns with Pratyush Narain 🚀 Today lecture about the difference between maximum and minimum sliding window technique - Maximum Window 🪟 1. Constraints: Sum <=k 2. High iterate 0 --> n 3. Include high 4. Shrink when information is wrong ℹ️ 5. Store result Minimum Window 🪟 1. Constraints: Sum >=k 2. High iterate 0 --> n 3. Include high 4. Shrink when information is correct and also store the result ℹ️ Thank you ♥️ #slidingwindow #minimumwindow #maximumwindow #dsapython #programming #coding #padhowithpratyush #leetcode #problem #consistency
Faheem ㅤ’s Post
More Relevant Posts
-
🚀 Day 95 of #100DaysOfCode Solved Kth Largest Element in an Array using an optimized frequency map approach instead of sorting. 🔍 Key Idea: Count frequency of each number using unordered_map Track the max element Iterate downward from max → INT_MIN Accumulate frequencies until reaching the Kth largest ⚡ Benefits: Avoids full sorting Efficient when value range is large but repetitions exist Works well for datasets with many duplicates #CPP #DSA #HashMap #CodingJourney #LeetCode #TwoPointers #Programming
To view or add a comment, sign in
-
-
Every programmer starts here! Here’s the simplest and easiest-to-understand Algorithm. Linear Search Algorithm in C++. It checks each element one by one until it finds the target. Perfect for beginners learning how searching works! #CPlusPlus #Coding #Algorithms #Learning #Programming #LearnToCode #DeveloperJourney #CodeNewbie #100DaysOfCode #ComputerScience #TechLearning
To view or add a comment, sign in
-
-
🔥 Day 12 of 100 Days of Code — Inversion Count Problem (C++) Today I worked on a classic and very important problem in DSA: Inversion Count. An inversion occurs when a pair of indices (i, j) satisfies: 👉 i < j 👉 arr[i] > arr[j] This problem is especially useful in understanding how efficient sorting algorithms (like Merge Sort) work internally. 🧠 Key Learning: Instead of checking every pair (which takes O(n²)), we can use a modified Merge Sort approach to count inversions in O(n log n) time. This makes the algorithm scalable even for large input sizes! 💻 Here’s the approach in C++: #100DaysOfCode #DSA #C++ #CodingJourney #Programming #LearningEveryday
To view or add a comment, sign in
-
-
🎯 The Greedy Method — Explained in 60 Seconds! Ever heard of the Greedy Algorithm but found it too abstract? Here’s the simplest way to understand it ⏱️ It’s all about making the best choice at each step, hoping it leads to the best overall result. Check out this quick 60-second explainer video that simplifies it visually 👇 🎥https://lnkd.in/gnRUATJU #Algorithms #DSA #Programming #TechLearning #CodingInterview
To view or add a comment, sign in
-
🚀 Variadic Templates in C++ Variadic templates allow functions and classes to accept a variable number of template arguments. This is achieved using parameter packs, which can be expanded using recursion or fold expressions. Variadic templates are essential for implementing functions like `printf` or generic tuple classes. They provide a flexible way to handle different numbers and types of arguments in a type-safe manner. Variadic templates significantly enhance the expressiveness of C++ templates. 💪 Stop scrolling. Start learning! 📚 Everything you need to master tech — 10,000+ concepts, 4,000+ articles, 12,000+ quizzes. Personalized for you! 👇 Links available in the comments! #c++ #programming #coding #tech #learning #professional #career #development
To view or add a comment, sign in
-
-
On Day 286 of my #300daysofcode challenge, I'm sharing my solution to LeetCode Problem 3461, "Maximum Length of Semi-Decreasing Subarrays." This problem is a good reminder that a simple brute-force approach is often the most direct and effective solution for smaller constraints or as a foundational step before optimization. My video provides a clear walkthrough of this logical method. #DataStructures #Algorithms #LeetCode #CodingInterview #Programming #ProblemSolving #300daysofcode
To view or add a comment, sign in
-
Ever wondered how your favorite apps and games are made? It all starts with programming! 💻 Programming is essentially giving instructions to a computer in a language it understands. It's like writing a recipe, but for a machine to follow. Mastering a programming language opens up a world of possibilities, letting you create anything from simple scripts to complex AI. #Programming #Coding #LearnToCode #CSE #Hello_World #OmniCodeLab #CodingForBeginners #SoftwareDevelopment
To view or add a comment, sign in
-
-
LeetCode #11 - Container With Most Water Two Pointer Approach | Time Complexity: O(n) linear time complexity This problem is a great example of how the Two-POinter technique can turn an O(n^2) brute force approach into an efficient O(n) solution. The Idea: 1. Start with two pointer at both ends 2. Move the smaller height pointer inward 3. Keep track of the maximum area #LeetCode #DSA #Coding #programming #ProblemSolving #TwoPonters #CPP #Prepration #DataStructure #Algorithm #LateNight
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development
Awesome