1863. Sum of All Subset XOR Totals | Bit Manipulation | Generating Subsets | Xor | 3 Approaches

  Рет қаралды 3,617

Aryan Mittal

Aryan Mittal

Күн бұрын

Пікірлер: 13
@ARYANMITTAL
@ARYANMITTAL 6 ай бұрын
Of course not an easy one, if this comes in an interview & Interviewer expects 3rd approach, then best of luck from my side if you have not seen the video 👍🌚 . Money Laundering & Drug Trafficking Scam with me - kzbin.info/www/bejne/mJa3qqeJaLybiZI
@ravipatel-xu5qi
@ravipatel-xu5qi 6 ай бұрын
thank you Aryan for putting effort everyday. A small request, it will be really helpful if you can put chapter into your video. So that we can jump between the sections easily and can watch the specific part. Here if you are explaining approches ,than better to have chapters based on that. Thank you.
@abishekupadhyay6357
@abishekupadhyay6357 6 ай бұрын
amazing explanation sir.
@dewanshpatle9056
@dewanshpatle9056 6 ай бұрын
TYSM for the explaination.
@rohita6532
@rohita6532 6 ай бұрын
if someone struggling in last explanation they can see neetcode solution video he explained in short and easy way
@mumukshapant
@mumukshapant 3 ай бұрын
Your backtracking crash course is not available
@cenacr007
@cenacr007 6 ай бұрын
❤️
@RohanSharma-tl9wh
@RohanSharma-tl9wh 6 ай бұрын
pooja ghanti at 11:00
@kevinesh
@kevinesh 6 ай бұрын
Thnk you for the explanation. However, I'm not really convinced with the contribution of every bit to be 2 ^ (n-1) you didn't show the formal proof, just an intuition based on a example.
@ARYANMITTAL
@ARYANMITTAL 6 ай бұрын
Ohh that's one liner after this example. Imagine ith bit of those n numbers are like 11000.....11010 i.e x 1's & y 0's at the ith bit, now this ith bit will have 1 in the end after doing xor only when 1 is occuring odd number of times, which is same way saying find me the number of subsets having odd number of 1s. Its counter proof is available here (Number of subsets with even number of ones = Number of subsets with odd number of ones) - math.stackexchange.com/questions/1338787/number-of-subsets-with-even-number-of-elements
@ITACHIUCHIHA-dr8sz
@ITACHIUCHIHA-dr8sz 6 ай бұрын
//find contribution of each bit in sum // let k elements have the ith bit set // ways1 = ways to choose ith bit not set = 2^(n - k) // ways2 = ways to choose ith bit set = kC1 + kC3 + kC5... kCk => 2 ^ (k - 1) since xor of odd count of 1's would contribute to ans // total ways = ways1 * ways2 = 2 ^(n - 1) // total contribution to ans = totalways * each way contribution which is (1
@asimshah1824
@asimshah1824 6 ай бұрын
The tf is the leetcode easy
@KADOfficial23
@KADOfficial23 6 ай бұрын
kya bol rha hai kuch samajh mein nhi aa rha hai
Sum of All Subsets XOR Total - Leetcode 1863 - Python
18:26
NeetCodeIO
Рет қаралды 11 М.
What type of pedestrian are you?😄 #tiktok #elsarca
00:28
Elsa Arca
Рет қаралды 32 МЛН
If people acted like cats 🙀😹 LeoNata family #shorts
00:22
LeoNata Family
Рет қаралды 11 МЛН
1, 2, 3, 4, 5, 6, 7, 8, 9 🙈⚽️
00:46
Celine Dept
Рет қаралды 111 МЛН
Valid Parentheses - Leetcode 20 - Python
4:37
Tim Huang
Рет қаралды 1
Concepts of Bitmasking
26:00
Techdose
Рет қаралды 48 М.
Where is Rust being used?
11:46
Let's Get Rusty
Рет қаралды 124 М.
Bitwise Operations tutorial #1 | XOR, Shift, Subsets
12:04
Errichto Algorithms
Рет қаралды 215 М.
What type of pedestrian are you?😄 #tiktok #elsarca
00:28
Elsa Arca
Рет қаралды 32 МЛН