3097. Shortest Subarray With OR at Least K II | Sliding Window | 2 Pointers | Bit Manipulation

Sdílet
Vložit
  • čas přidán 29. 03. 2024
  • In this video, I'll talk about how to solve Leetcode 3095. Shortest Subarray With OR at Least K I & 3097. Shortest Subarray With OR at Least K II
    Learn 2 Pointers Basics & where to apply - • 930. Binary Subarrays ...
    Practice Problem - • 713. Subarray Product ...
    Let's Connect:
    📝Linkedin: / aryan-mittal-0077
    📸 Instagram: / ez.pz.dsa
    📱Telegram : t.me/aryan_mittal_group
    🤖 Github: github.com/aryan-0077
    About Me:
    I am Aryan Mittal - A Software Engineer in Goldman Sachs, Speaker, Creator & Educator. During my free time, I create programming education content on this channel & also how to use that to grow :)
    ✨ Timelines✨
    ✨ Hashtags ✨
    #programming #Interviews #leetcode #faang #maang #datastructures #algorithms

Komentáře • 18

  • @IK-xk7ex
    @IK-xk7ex Před 3 měsíci +4

    I solved it by myself yesterday!

  • @priyanshkumariitd
    @priyanshkumariitd Před měsícem

    Thanks, great explanation

  • @shivamgurjar8979
    @shivamgurjar8979 Před měsícem

    brilliant solution

  • @ekanshgupta2930
    @ekanshgupta2930 Před 3 měsíci +8

    hnoest question how do you think of such approaches while the contest itself even if I was given like 10 days to solve this I wouldn't have thought of an approach like this one

    • @mbm.editzz
      @mbm.editzz Před 3 měsíci +4

      mera toh 3rd yr khatam hone ko aya hai abhi bhi nhi hua

  • @chase.2595
    @chase.2595 Před 3 měsíci +3

    aryan mittal legend

  • @kafuu1
    @kafuu1 Před 2 měsíci

    you are such a genius! I wish I can be as smart as you one day!

  • @devanshsengar1877
    @devanshsengar1877 Před 3 měsíci

    very helpful bro

  • @tzuilee588
    @tzuilee588 Před 3 měsíci +2

    Well explained and nice test case walk-through man!
    Just a small suggestion: you're adding too much drama in your facial expressions on camera, kind of distractive lol

  • @abishekupadhyay6357
    @abishekupadhyay6357 Před 3 měsíci +2

    bro many many thanks to you. apne iss week 2 pointer itni ache se explain kiya ki i got this one almost instantly during the contest. You are amazing bhai.

    • @akuma_168
      @akuma_168 Před 3 měsíci

      got stuck in removing OR value from starting pointer. I just suck at bit manipulation.

    • @Anonymous____________A721
      @Anonymous____________A721 Před 9 dny

      @abhishek pls share your profile or your solution link
      I am unable to understand any code

  • @k.satish3663
    @k.satish3663 Před 3 měsíci +7

    sliding window marathon

    • @chase.2595
      @chase.2595 Před 3 měsíci +1

      yeah even daily problems are of sw

  • @prakashnandan7337
    @prakashnandan7337 Před 3 měsíci

    Thanks Aryan

  • @mbm.editzz
    @mbm.editzz Před 3 měsíci

    BRO ISSE NAHI HOSAKTA KYA
    #define ll long long
    #include
    using namespace std;
    class Solution {
    public:
    int minimumSubarrayLength(vector& nums, int k) {
    mapmp;
    int n=nums.size();
    ll ans=1e8;
    for(int i=0;i=k)return 1;
    ll x=nums[i];
    ll count=1;
    for(int j=i+1;j=k){
    ans=min(ans,mp[{i,j}]);
    }
    }
    }
    if(ans==1e8){
    return -1;
    }
    return ans;
    }
    };