Sir, I understand the concept that to get x we check for each bit by checking if this bit was 0 we will get how many inversion and if bit was 1 we will get how many inversions but unable to understand the divide and conquer part that why are we dividing the approach ?
that is because, if we can get some 'n' equal elements, then we can also get n-2 equal elements as explained, so if n is odd, you can keep going to n-2 to reach 3 and if n is even, you can keep going to n-2 to reach 2.
I was really mesmerized with counting the inversion through bits, woww!
please make 3/4 videos on GRAPH + TREE only problem solving general tricks and tips some common patterns
Thank you very much for this ...
Please keep posting more on CP
A plate of maggi and this episode, enjoying and learning at the same time
name a better combo Harisam, I’ll wait 😂
I can't because it doesn't exist xD
Sir, I understand the concept that to get x we check for each bit by checking if this bit was 0 we will get how many inversion and if bit was 1 we will get how many inversions but unable to understand the divide and conquer part that why are we dividing the approach ?
Why we are checking for only 2 and 3.....and not for the size more than 3....
???
that is because, if we can get some 'n' equal elements, then we can also get n-2 equal elements as explained, so if n is odd, you can keep going to n-2 to reach 3 and if n is even, you can keep going to n-2 to reach 2.