First negative integer in every window of size k-(Amazon,MentorGraphics):Explanation➕ Live Coding

Поділитися
Вставка
  • Опубліковано 8 лют 2025
  • This is our 4th Video on our Sliding Window Playlist.
    In this video we will try to solve a very interesting Problem : "First negative integer in every window of size k"
    We will do live coding after explanation and see if we are able to pass all the test cases.
    Problem Name : First negative integer in every window of size k
    Company Tags : Amazon, MentorGraphics
    My solutions on Github : github.com/MAZ...
    GfG Link : practice.geeks...
    My GitHub Repo for interview preparation : github.com/MAZ...
    Subscribe to my channel : / @codestorywithmik
    ╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
    ║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
    ╠╗║╚╝║║╠╗║╚╣║║║║║═╣
    ╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
    #coding #helpajobseeker #easyrecipes
    #interviewpreparation #interview_ds_algo #hinglish

КОМЕНТАРІ • 38

  • @shantanughosh655
    @shantanughosh655 Рік тому +9

    This is the best explanation of the problem. I was watching Aditya Verma's playlist on Sliding window and didn't understand explanation of this problem. Searched on YT and ended up on your video. Very much clear now 🙏

    • @advaithmahendrakar
      @advaithmahendrakar Рік тому

      same here

    • @sharaabsingh
      @sharaabsingh 11 місяців тому

      Jab Verma Ji bhi nai samjha paate toh in the end story sunn ne aana hi padta hai... Great explanation MIK Ji❤

    • @ShariquaSuman
      @ShariquaSuman 3 місяці тому

      same here...landed after watching aditya verma

    • @slmshady539
      @slmshady539 2 місяці тому +1

      I am not saying he's bad but uss bhai ne time waste kia bas, itni bar purane question ka reference aur kahani sunaya k context hi kho gaya k karne kya aya tha.. short simple to the point content nahi hai Aditya Verma ka

  • @saurabhc4278
    @saurabhc4278 2 роки тому +6

    Awesome !! First time i understood sliding window concept so comfortably !

    • @codestorywithMIK
      @codestorywithMIK  2 роки тому +2

      I am so glad . Thanks a lot for your precious words ❤️❤️❤️

  • @slmshady539
    @slmshady539 2 місяці тому +2

    bhai bhot alag level hai tumhara. sach me bhot kamal ka samjhaya hai

  • @iamnoob7593
    @iamnoob7593 2 місяці тому +1

    What what a solution , Superb Explanation , Combination of concise + Beautiful explanation. So so good.

  • @Satya-g5t
    @Satya-g5t 2 місяці тому

    yes, cool and most importantly patiently explained in detail very nice concept. 😄

  • @piyushacharya7696
    @piyushacharya7696 2 роки тому +3

    bhai reach++.
    Yrr apka soln kuch alag hi accha lagta hai. maine bhi code kia par utna efficient nahi tha.🔥

  • @mdsaquib5660
    @mdsaquib5660 Рік тому +1

    Amazing explanation . after watching backtracking playlist i always prefer your videos for dsa

  • @Devildriver4441
    @Devildriver4441 Рік тому +3

    so clear explanation.Bhaiya queue use krne se bhi hoga na?

  • @DevOpskagyaan
    @DevOpskagyaan Рік тому +1

    You are the best ❤

  • @amanbalhara7365
    @amanbalhara7365 2 роки тому +2

    Explained very well !!. Tq

  • @sreejasree7427
    @sreejasree7427 9 днів тому +1

    thankyou sir

  • @shreyanshtiwari5384
    @shreyanshtiwari5384 2 роки тому +1

    nice one bro

  • @girikgarg8
    @girikgarg8 Рік тому +1

    Nice explanation

  • @CodeMode9313
    @CodeMode9313 Рік тому

    bhai katai jhakas >>>

  • @jagadeeshp1163
    @jagadeeshp1163 Рік тому +1

    def printFirstNegativeInteger( A, N, k):
    i=0
    que=[]
    ans=[]
    for j in range(N):
    if A[j]

  • @wearevacationuncoverers
    @wearevacationuncoverers Рік тому

    Awesome

  • @sparshyadav9709
    @sparshyadav9709 10 місяців тому

    Understood.

  • @nikhil4062
    @nikhil4062 Рік тому

    u have taken i and j as int but when j will become equal to N,then can j hold N which is of type long long.Pls explain?

  • @HIMANSHUTIWARI-c8h
    @HIMANSHUTIWARI-c8h 22 дні тому

    best way to convert story to code with codeStoryWithMike

  • @RahulJenaknow_it
    @RahulJenaknow_it 6 місяців тому

    bhai, sabse pehley window length kyun nhi chck krtey if its equal to "k" and then perform operation .. i m curious to know, kyunki window size barabar ho to matlab hai check krney ka , ussey pehley kyun store krkey rakh rehy hain negatives? i might be wrong , but I want to know why ?

    • @udaytewary3809
      @udaytewary3809 2 місяці тому

      Dekho bhai main baat ye h ki sbhi sliding window problem me ye baat specifically haa ki hm tbhi answer ke contribution ko valid mante h jb hmara desired window size achieve Hota haa
      Agr tm phle hi window size check karoge to ye ho skta h tm tm galat answer accumulate kr lo ya tmhe unnecessary complications bd jaye

  • @gamersgame43
    @gamersgame43 2 місяці тому

    why does the brute force approach passed all the test case in gfg
    vector FirstNegativeInteger(vector& arr, int k) {
    int n = arr.size();
    vector ans(n-k+1);
    int idx = 0;
    for(int i = 0; i

  • @surve388
    @surve388 10 місяців тому

    Bro is this question present in leetcode ,if yes what is the question number?

    • @virat7215
      @virat7215 4 місяці тому

      It is present in geeks for geeks

  • @Sayannitd
    @Sayannitd Рік тому

    gold mine

  • @sparshyadav9709
    @sparshyadav9709 10 місяців тому +2

    Understood.