If we add all the nums in the range and then also add the nums in the given array and subtract the sums. we would get the required answer. Wouldn't this be the most efficient way for a brute force method? btw wonderful explanation, thanks!
what an excellent explaination bhaiya . Thanks for making such amazing videos for we student. I always look for ur videos whenver I search a problem on yt.
What if we use the freq array approach and find max element in array and create the freq array of that size and then increase the index, we can check if the index is 0 then that’s the missing number ?
to be honest, it is very unlikely that you will get tough bit manipulation questions during an interview. You are just expected to know the basics, like what is left shift, what is right shift, XOR etc. As an interviewer, I would never ask a programming problem whose solution relies on a bit manipulation technique.
// Online C compiler to run C program online #include int main() { int arr[] = { 1,5, 9, 100 }; int m = 0; int size = sizeof(arr)/sizeof(int); for (int i = 0 ; i< size ; i++) { for (int j = m+2 ; j < arr[i+1]; j++) { if ( arr[i] != arr[j]) { printf(" %d", j); } m = j ; } printf(" "); } }
xor solution explanation is nice🙃🙃
One of the best videos for this problem and logic explanation. Kudos ✌
Xor pehli baar dhang se samajh aaya h , thanks brother 😊😊
Great explanation , need more such videos on different Leet code problems.
best expalnation so far in youtub regarding this topic/problem.
the best explanation
Very nice explanations
You explained so well then others
Thanks excellent explanation Xor how use in this solution
Thank you very much for the wonderful explanation 😊
Bahut accha padhaye ho bhaiyaa aap.🫂❤
This is one of the best explained video for this problem
Hey man! your explanation skills are excellent.
Glad you like them!
Sir your explanation is awesome ♥♥♥
great bro
Amazing explanation, thanks 👍
like your solution! thanks
If we add all the nums in the range and then also add the nums in the given array and subtract the sums. we would get the required answer. Wouldn't this be the most efficient way for a brute force method?
btw wonderful explanation, thanks!
Yeah it will definitely work but we need optimized code...
Nice! The xor really capped it. Thank you! (I couldn't resist...)
missing = arr.reduce((t,v,i) => t ^ v ^ i, arr.length);
Great explanation!!!
what an excellent explaination bhaiya . Thanks for making such amazing videos for we student.
I always look for ur videos whenver I search a problem on yt.
So nice of you
🎉Good
thank you so much
sir can you make video on another part of this problem(repeat and missing number)
let me check it out.. :)
how this "xor " solution can't pass test case
The best one 😊
Thank you.
What if we use the freq array approach and find max element in array and create the freq array of that size and then increase the index, we can check if the index is 0 then that’s the missing number ?
thank you sir
Thank you you help me so much
I'm so glad!
Спасибо индусу за туториал 👍
you are welcome
awsome brother🥸
Is bit manipulation important for interview??
to be honest, it is very unlikely that you will get tough bit manipulation questions during an interview. You are just expected to know the basics, like what is left shift, what is right shift, XOR etc.
As an interviewer, I would never ask a programming problem whose solution relies on a bit manipulation technique.
can u give the brute force solution pls
have you tried writing some code?
@@nikoo28 I tried but I can't got it
Hey Nikhil I love your content, do you have any plans for collabs? Like live problem solving and whatnots?
glad you liked my content. Yep...I have plans for collabs and live sessions when the time is right :)
@@nikoo28 or provide me your insta account I will dm you.
@@kunalkheeva you can email me on the address provided in the channel description :)
Bruteforce ka code send krdo
You don’t need the code for brute force method
0,1 ka kese niklega iss approch se
What do you mean?? Please elaborate a little
😅😅😅😅😅😅😅
good explanation bro..
// Online C compiler to run C program online
#include
int main() {
int arr[] = { 1,5, 9, 100 };
int m = 0;
int size = sizeof(arr)/sizeof(int);
for (int i = 0 ; i< size ; i++)
{
for (int j = m+2 ; j < arr[i+1]; j++)
{
if ( arr[i] != arr[j])
{
printf(" %d", j);
}
m = j ;
}
printf("
");
}
}