Find the two non-repeating elements in an array of repeating elements | Bit Manipulation | DSA Sheet

Sdílet
Vložit
  • čas přidán 23. 07. 2024
  • #bit #bitmanipulation #bitmasking #competitiveprogramming #coding #dsa
    Hey, Guys in this video I have explained how we can solve the problem 'Find the two non-repeating elements in an array of repeating elements'.
    --------------------------------------------------------------------------------
    Unacademy Links--
    Use my code "YOGESH" to access all FREE classes and get a 10% Discount on Paid Courses.
    Career as a Developer: unacademy.com/goal/career-as-...
    Approaching CodeChef: bit.ly/Unacademy-Yogesh-Softw...
    --------------------------------------------------------------------------------
    Join our Telegram Channel for more Information
    🔰 Telegram Channel Link = t.me/CodeLibrary1
    🔰 Telegram Discussion Group Link = t.me/CodeLibraryDiscussion
    Subscribe Our 2nd Channel = / @codeupwithtwins6728
    🔰 Array Playlist = • Love Babbar DSA 450 Qu...
    🔰 String Playlist = • Love Babbar DSA 450 Qu...
    🔰 Searching and Sorting Playlist = • Love Babbar DSA 450 Qu...
    🔰 Binary Tree Playlist = • Love Babbar DSA 450 Qu...
    🔰 Linked List Playlist = • Love Babbar DSA 450 Qu...
    🔰 Graph Playlist = • Love Babbar DSA 450 Qu...
    🔰 Dynamic Programming Playlist = • Love Babbar DSA 450 Qu...
    🔰 Informative Videos = • Informative Videos
    🔰 Love Babbar DSA Sheet: drive.google.com/file/d/1FMdN...
    Follow us on Instagram:
    🔰 Shailesh Yogendra : / shaileshyogendra
    🔰 Yogesh Yogendra : / i_am_yogesh_here
    Follow us on LinkedIn:
    🔰 Yogesh Yogendra : / yogesh-yogendra-26bbb518a
    🔰 Shailesh Yogendra : / shailesh-yogendra-8b13...
    Hope you like it. Comment if you have any doubt
    LIKE | SHARE | SUBSCRIBE
    Time Stamps
    0:00 Intro + Example
    2:16 promo
    3:46 Explanation + Code

Komentáře • 42

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

    bhai maza aagya thankyou... i recently started DSA sheet this videos is helpfull keep it up

  • @vivekjaiswal4391
    @vivekjaiswal4391 Před rokem

    Really a great teacher ......keep it up

  • @aadityasharma6855
    @aadityasharma6855 Před 2 lety +5

    Crystal clear explaination, thank you so much.

  • @pratapp.s.p.6264
    @pratapp.s.p.6264 Před rokem +2

    Bhai kuch kuch numbers pe ye sahi nhi run ho raha

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

    what if both the elements are even ?
    or both the elements are odd ?
    then how do we split ?

  • @SaumyaSharma007
    @SaumyaSharma007 Před 11 měsíci +1

    thanks, bros.

  • @ashutoshyadav1529
    @ashutoshyadav1529 Před 2 lety +5

    what if both non repeating numbers are even example: 1,1,2,3,3,4,5,5 will this code run for it?

    • @BaljeetSingh-ul3yo
      @BaljeetSingh-ul3yo Před rokem +1

      class Solution {
      public int[] singleNumber(int[] nums) {
      int res = 0,setBit=1;
      int[] result = new int[2];
      for(int i=0;i

  • @shivanigowda3526
    @shivanigowda3526 Před rokem

    very nice explaination

  • @sukritiguin5637
    @sukritiguin5637 Před rokem

    great explanation

  • @user-ou9kp4vn2g
    @user-ou9kp4vn2g Před rokem

    at line 30you sort the elenment ? doesn't it takes TC nlogn?

  • @Mandeepsingh-jo5cf
    @Mandeepsingh-jo5cf Před 2 lety

    thanks!

  • @melodytunes2204
    @melodytunes2204 Před rokem

    bhai apka explanation toh kamal hai

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

    awesome voice +explaination

  • @AmanMishra-rg3jd
    @AmanMishra-rg3jd Před 2 lety +1

    i know java i have one doubt that while using Vector ans will our space complexity be O(n) ? in solution we want O(1) ? Correct me if i am wrong!

  • @NikitaSingh-kz2ii
    @NikitaSingh-kz2ii Před rokem

    can anyone plz share the code for sorting approach

  • @shubhamgond2884
    @shubhamgond2884 Před rokem

    Nice explanation

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

    can anyone please explain what is happening in line 17 and and how we get the formula xor & ~(xor-1) ?

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

      a&(~(a-1)) gives "1" where the right most bit is "1" and "0" in other places

    • @SreejanjiVlogss
      @SreejanjiVlogss Před 2 lety

      @@senkaku7705 thnxs🙂

  • @showsshorts4696
    @showsshorts4696 Před rokem

    bhaiya rightmost bit xor&1 karke bhi toh nikali jaa shakti thi what is the catch in this

  • @shrutiomatic
    @shrutiomatic Před 2 lety

    5:54
    Sort
    Hash map
    Bits

  • @official.frostburn
    @official.frostburn Před 2 lety

    Bro, zoho ke level 2 Hai Mera 27 ko, zoho vale konse topics pr focus karte Hai?

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

      level 2 focus more on array,strings,hashing and matrix

  • @Manishkumar-wt9tf
    @Manishkumar-wt9tf Před rokem

    sir aapne odd number aur even number ko alg kar dene ko agar non repeating element dono odd ya even ho to usko thori na find out kar skate hain.

    • @BaljeetSingh-ul3yo
      @BaljeetSingh-ul3yo Před rokem

      class Solution {
      public int[] singleNumber(int[] nums) {
      int res = 0,setBit=1;
      int[] result = new int[2];
      for(int i=0;i

  • @hariprasadcr5936
    @hariprasadcr5936 Před 2 lety

    excellent explanation , :)

  • @Skm-mq1sw
    @Skm-mq1sw Před 2 lety +2

    Bro heap ka bhi bna do

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

    Bhaiya please graph ke upload karo

    • @CodeLibrary
      @CodeLibrary  Před 2 lety

      graph ke toh bahut sare upload kiye hue hai....have a look in playlist

    • @nomaanahmad5851
      @nomaanahmad5851 Před 2 lety

      @@CodeLibrary nhi bhai uske aage ki baat kr rha hu

    • @CodeLibrary
      @CodeLibrary  Před 2 lety

      will do that don't worry

    • @nomaanahmad5851
      @nomaanahmad5851 Před 2 lety

      @@CodeLibrary bhaiya ye batao apne experience se kya ye sheet sirf solve kr lene ke baad yahi question repeat hoga interview me

    • @CodeLibrary
      @CodeLibrary  Před 2 lety

      jaruri nhi hai new questions bhi aa sakte hai but agar tum ye sheet solve kar lete ho toh tumhe new questions karne ka confidence aa jaega

  • @MohitKumar-is2xg
    @MohitKumar-is2xg Před 2 lety

    vahyaad explaination

  • @anujprajapati2905
    @anujprajapati2905 Před 2 lety

    Bro please provide the code in python too.

  • @tanaypatidar2825
    @tanaypatidar2825 Před 2 lety

    abhi bhi short hi bol rahe ho bhai, short == sort