Find the Repeating and the Missing Element | Love Babbar DSA Sheet | Leetcode | Amazon 🔥| Placement

Sdílet
Vložit
  • čas přidán 17. 12. 2020
  • #sorting and searching #competitiveprogramming #coding #dsa
    Hey Guys in this video I have explained with code how we can solve the problem 'Find the repeating and the missing element'.
    Roadmap for Dynamic Programming = • Complete Roadmap for D...
    Great Strategy to solve DSA = • Great Strategy to solv...
    String question Playlist = • Love Babbar DSA 450 Qu...
    Array question Playlist = • Love Babbar DSA 450 Qu...
    Binary Tree question Playlist = • Love Babbar DSA 450 Qu...
    Dynamic Programming question Playlist = • Love Babbar DSA 450 Qu...
    My Journey to 5 star at codechef = • My Journey to 5 Star a...
    Love Babbar DSA Sheet : drive.google.com/file/d/1FMdN...
    Hope you like it. Comment if you have any doubt
    LIKE | SHARE | SUBSCRIBE

Komentáře • 38

  • @tanmaythaker2905
    @tanmaythaker2905 Před 3 lety +11

    What an explanation! Loved it

  • @bea6033
    @bea6033 Před rokem +4

    it was difficult t follow where it started what actuall you did randomly picking index i had to see it 7 times to understand

  • @manishrajwani3195
    @manishrajwani3195 Před 3 lety +5

    Loved it. Found this explanation unique and amazing ❤️

  • @manishjaiswal8597
    @manishjaiswal8597 Před 2 lety +1

    your way of explanation is exellent,thankyou

  • @suchithkumar1473
    @suchithkumar1473 Před rokem

    unique and amazing explanation...thank you

  • @mohitsharan3900
    @mohitsharan3900 Před 3 lety

    Mast explain krte bhaiii!!!!!

  • @PankajGupta-gh9cm
    @PankajGupta-gh9cm Před 3 lety +10

    what if we are not allowed to modify the array element ??

    • @arshpreetkaurtiwana2628
      @arshpreetkaurtiwana2628 Před rokem

      Then make a temporary array and initialise it with zeroes,traverse the array mark the visited values as negative or one in temporary array...if we got already marked index in temporary array than it is repeating element,now after this traverse the array and check if there is any index left with value zero than that will be missing element....t.c.-o(n)...but s.c.-o(n)

  • @abhaychaturvdi
    @abhaychaturvdi Před 2 lety +1

    best explanation , thankyou

  • @saumitragupta3560
    @saumitragupta3560 Před rokem

    Loved it ... big fan apka

  • @varshasomanath6387
    @varshasomanath6387 Před 3 lety +1

    Amazing explanation bro 👍

  • @Sumeet_100
    @Sumeet_100 Před 10 měsíci

    Thank You for this Video !!

  • @abacas2175
    @abacas2175 Před 3 lety +3

    How u think like that..how I develop my logical thinking..

  • @prempatel2943
    @prempatel2943 Před 2 lety

    what an approch brother great

  • @harshitavyas7497
    @harshitavyas7497 Před 2 lety +1

    what a logical thinking!!!!! hats off

  • @suvigyabasnotra7378
    @suvigyabasnotra7378 Před rokem +2

    in the second for loop, we should have stored b = arr[i + 1] for the value, why did you store the index in it...?

  • @Codebreaker0702
    @Codebreaker0702 Před rokem +1

    if i'm trying to do this question using 1 based indexing....It is giving me segmentation fault...Do u know why?

  • @gokulnaathbaskar9808
    @gokulnaathbaskar9808 Před 2 lety

    Nice explanation!

  • @arpitasingh6849
    @arpitasingh6849 Před rokem

    Bhai can we not optimize this because it takes n2 time complexity
    I think we can use only one for loop or both operation perform in one for loop ......

  • @krishanpratap3286
    @krishanpratap3286 Před 2 lety +1

    bhayiya agar jaise array is [3,1,2,1] toh isme kaise cycle banaye?

  • @thelostinshan
    @thelostinshan Před rokem

    thanks

  • @atanujana8119
    @atanujana8119 Před 2 lety

    I think we should use cycle sort

  • @BljtKuntal
    @BljtKuntal Před 3 lety +3

    if(arr[abs(arr[i])-1]

    • @brijbhusanpandey6745
      @brijbhusanpandey6745 Před 2 lety +2

      arr[-1] won't happen because range always 1 to N. So arr[-1] will not appear at most arr[0] will come

  • @ritikjalal117
    @ritikjalal117 Před 3 lety +1

    pls make a video on kmp algo pls pls

  • @devgrewal1701
    @devgrewal1701 Před rokem

    agar elements 10 sa start hora to fir kasa nikala ga bhai

  • @kritisharma5371
    @kritisharma5371 Před 2 lety

    Time complexity O(N*N) hojaegi na 2 for loop lgae h jb

    • @ankitdwivedi4213
      @ankitdwivedi4213 Před 2 lety +1

      nahi bhai dono loop separate hai to complexity add hogi O(N)+O(N)

  • @mridulsarma9022
    @mridulsarma9022 Před 2 lety

    I have one qstn in this

  • @anshsrivastava8754
    @anshsrivastava8754 Před rokem

    Accha, tum Yogesh ho, Shaliesh, Vishesh, Akhilesh, Mithilesh, Ankesh and Durgesh kaha hai?

  • @aryanchaurasia3042
    @aryanchaurasia3042 Před 2 lety

    Sir please question ka pdf share kar digiye

    • @suchithkumar1473
      @suchithkumar1473 Před rokem

      drive.google.com/file/d/1FMdN_OCfOI0iAeDlqswCiC2DZzD4nPsb/view

  • @meetbrahmbhatt480
    @meetbrahmbhatt480 Před 4 měsíci

    You are making it too complicated bro