Find Missing and Repeating Number | 5 Approaches with Full Code in Comments | Bit Manipulation Array

Sdílet
Vložit
  • čas přidán 5. 07. 2024
  • Timestamps:
    0:00 Approach 1 Sorting
    2:00 Approach 2 Count Tracker
    3:15 Approach 3 Summation Trick
    7:45 Approach 4 Sign Trick
    10:40 Code of Approach 4
    13:20 Approach 5 Bit Manipulation XOR
    17:25 Code of Approach 5
    Connect with me on LinkedIn : / alisha-parveen-80579850
    Check out our other playlists:
    Dynamic Programming:
    • Dynamic Programming
    Trees:
    • Trees
    Heaps and Maps:
    • Heaps and Maps
    Arrays and Maths:
    • Arrays and Maths
    Bit Manipulation:
    • Bit Manipulation
    Greedy Algorithms:
    • Greedy Algorithms
    Sorting and Searching:
    • Sorting and Searching
    Strings:
    • Strings
    Linked Lists:
    • Linked Lists
    Stack and Queues:
    • Stacks and Queues
    Two Pointers:
    • Two pointers
    Graphs, BFS, DFS:
    • Graphs, DFS, BFS
    Backtracking:
    • Backtracking
    Non- DSA playlists:
    Probability:
    • Probability
    SQL-Basic Join functions:
    • SQL - Basic JOIN Funct...
    SQL-Basic Aggregate functions:
    • SQL-Basic Aggregate Fu...

Komentáře • 38

  • @probabilitycodingisfunis1
    @probabilitycodingisfunis1  Před 2 lety +17

    Using Sign Trick:
    int* ans;
    // ans[0]->repeating
    // ans[1]->missing
    for(int i=0;i 1
    if(arr[x]repeating
    ans[1] = 0; //bit not set //->missing
    for(int i=0;i

  • @valarmorghulis9244
    @valarmorghulis9244 Před rokem +5

    Your XOR explanation is the best on youtube. I randomly chose to see this video on search results and now I am surprised by such a beautiful explanation.

  • @samit840
    @samit840 Před 8 měsíci +1

    I found a highly underrated GEM
    You are way better than so called DSA-Gurus

  • @anishgupta3235
    @anishgupta3235 Před rokem +3

    Your channel is so underrated! Thanks for the alternate approaches, great explanation.

  • @sarowerrafin5168
    @sarowerrafin5168 Před rokem +3

    I personally recommend your videos to all my coder friends as your ability of making people understand the solution is amazing

  • @wisdomkhan
    @wisdomkhan Před 2 lety +6

    You explained the XOR one the best I saw on YT

  • @MindsetMotivation75
    @MindsetMotivation75 Před rokem

    Watching after tons of videos in this problem. Finally i understood this now . Thank you very much. And to be honest , you explained this much better than striver.

  • @shivangisrivastava1158

    Love you Alisha, you are just the best.
    Literally nowhere on youtube could i find any clear solution. But you saved us.

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

    Just came back to this video to say thank you for making this, approach 2 and 4 are my preferred ways of solving this and are perfect. Thanks for your help

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

    you're one of the rare person who solves code in C , thats really wonderful , looking forward to more of your videos

  • @karthick...
    @karthick... Před 11 měsíci

    thank u i literally watched 2 times to catch your speed amazing work

  • @harish5466
    @harish5466 Před rokem

    Thank you. ur explanation is awesome

  • @pragneshamadavadi2267
    @pragneshamadavadi2267 Před 6 měsíci

    Exception Explanation 🔥

  • @sunilbhenspaliya9931
    @sunilbhenspaliya9931 Před 2 lety

    Thank you alisha👍🏽

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

    Thank you so much.

  • @Saurav_Kumar514
    @Saurav_Kumar514 Před rokem +1

    Amazing explanation ma'am 👌👌😊👍

  • @shivangisrivastava1158

    sign trick in Approach 3 is wowww!

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

    😊 thanks ma'am

  • @vrandakansal5940
    @vrandakansal5940 Před rokem

    Top notch explanation💯🔥

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

    u deserve 100k subscribers

  • @devbhattacharya153
    @devbhattacharya153 Před 2 lety

    Thanks a lot maam

  • @bandaruneeraj7246
    @bandaruneeraj7246 Před rokem

    This is most Underated Channel

  • @KishanKumar-mf5ru
    @KishanKumar-mf5ru Před rokem

    Xor explaining is awesome

  • @ashvinkumhar5819
    @ashvinkumhar5819 Před 2 lety

    Thanks diii

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

    Damn good yrr... 👍

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

    In XOR, how can we sure that the diffrentiating bit will lead us to the answer. I have understood your point for putting the values in 2 different buckets accordingly but how diffrentiating bit is leading us to the solution
    3^4 = 1 so what??

  • @Chris-ej5de
    @Chris-ej5de Před 6 měsíci

    how can we get multiple approaches with any problem ???? Unbelievable 🙌🙌🙌😵

  • @rushi8449
    @rushi8449 Před 2 lety +3

    You are too good 😍

  • @manojcmmohan9426
    @manojcmmohan9426 Před rokem

    👌👌👌

  • @backbencher304
    @backbencher304 Před rokem

    Didn't get the intuition behind xor approach

  • @it-series-music
    @it-series-music Před rokem

    The video is nice but I suggest that you avoid repeating same line multiple times. For e.g "xor of 2 and 3 is 1" you have repeated this thrice ....this makes the video unnecessarily long

  • @sincos4913
    @sincos4913 Před rokem

    striver really confuses a lot

  • @symbol767
    @symbol767 Před 2 lety

    I hate Math solution's so damn much. They are so unintuitive to come up with during an interview especially if you never seen this problem before.
    I'm gonna stick to the counts tracker solution and the sign trick solution, thank you

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

    You are a metallurgical engineering ,then how are so proficient in coding,huh?