2683. Neighboring Bitwise XOR | leetcode daily challenge | dsa | shashcode | java

Поділитися
Вставка
  • Опубліковано 28 січ 2025

КОМЕНТАРІ • 24

  • @shashwat_tiwari_st
    @shashwat_tiwari_st  12 днів тому +4

    like target for this video is 150. Please do like if you have understood the explanation as well as the code.😄

  • @anupamsingh8323
    @anupamsingh8323 5 днів тому +1

    Your teaching style is so impressive. Believe me I am saying this with very responsiblities.👏👏👏

  • @yashagane7627
    @yashagane7627 12 днів тому +1

    res=0
    for nums in derived:
    res^=nums
    return (res==0)
    python

  • @DarkDragon-bz6qp
    @DarkDragon-bz6qp 12 днів тому +1

    Thanks..Nice explanation..Similar to last day

  • @NarayanGupta-t9s
    @NarayanGupta-t9s 12 днів тому +1

    tagda bhai maine original array ikalne ke liye n**2 me try kiya nhi hua but tumhare waliapproch se 2 min me ho gya thank brother

    • @shashwat_tiwari_st
      @shashwat_tiwari_st  12 днів тому

      @@NarayanGupta-t9s original array nikalna muskil hai, because 0 ke liye original me 0 0 ya 1 1 hoga and 1 ke liye original me 0 1 ya 1 0 hoga. Maine socha tha ye but possible ni laga..

  • @tarunkumar9177
    @tarunkumar9177 12 днів тому

    nice explanation bhaiya

  • @PiyushSharma-we8yd
    @PiyushSharma-we8yd 12 днів тому

    sir, you are doing good work, I love your explanations. Please don't listen to people who do not understand how things work, don't answer them, just ask them to pay you monthly so that you can pay out expenses of running a youtube channel. I read some comments and they were very demeaning. I respect you a lot and I am happy that I have been following you and it has been really very helpful. Running an edtech channel is no joke. I would also suggest running paid batches that provide live interaction for students who have doubts and can ask immediately.

    • @shashwat_tiwari_st
      @shashwat_tiwari_st  12 днів тому

      not everyone understands and its okay. This is one of the reasons I have disabled dms on my social platforms...

  • @tanmayanand5489
    @tanmayanand5489 12 днів тому +1

    I solved this question and also the previous one daily leetcode challenge .

  • @prankcall7144
    @prankcall7144 11 днів тому

    Target is completed ❤

  • @aniket3s
    @aniket3s 12 днів тому

    150th like is mine 😅🎉 seriously

  • @devnarula6733
    @devnarula6733 12 днів тому +1

    what do you use to draw on screen?

  • @MadhurBakshi-i5i
    @MadhurBakshi-i5i 12 днів тому

    Hi sir, could you please explain why having an even number of 1s in the derived array is considered a sufficient condition?

    • @shashwat_tiwari_st
      @shashwat_tiwari_st  12 днів тому

      Even number of 1s? In this video I have explained that if condition is met then all elements will appear twice and cancel out it each other.. it is given in question ( d[i] = orig[i] xor orig[i+1]).

  • @opkrchauhan_1
    @opkrchauhan_1 12 днів тому

    class Solution {
    public boolean doesValidArrayExist(int[] derived) {
    int n = derived.length;
    int ans =0;
    for(int i:derived){
    ans ^=i;
    }
    if(ans==0){
    return true;
    }
    return false;
    }
    }