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.
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 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(" "); } }
One of the best videos for this problem and logic explanation. Kudos ✌
Great Explanation of leetcode problems.You are the only youtuber from which i can understand the leet question solutions. Keep it Up ♥
Great explanation , need more such videos on different Leet code problems.
best expalnation so far in youtub regarding this topic/problem.
xor solution explanation is nice🙃🙃
Xor pehli baar dhang se samajh aaya h , thanks brother 😊😊
This is one of the best explained video for this problem
Hey man! your explanation skills are excellent.
Glad you like them!
the best explanation
You explained so well then others
Thank you very much for the wonderful explanation 😊
Bahut accha padhaye ho bhaiyaa aap.🫂❤
Amazing 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.
So nice of you
Sir your explanation is awesome ♥♥♥
like your solution! thanks
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!!!
Very nice explanations
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...
Thanks excellent explanation Xor how use in this solution
good explanation bro..
in the first approach if 0 is the missing number, it wont work right? how can we clear that case?
The best one 😊
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 ?
sir can you make video on another part of this problem(repeat and missing number)
let me check it out.. :)
thank you so much
great bro
Thank you you help me so much
I'm so glad!
Thank you.
thank you sir
Спасибо индусу за туториал 👍
you are welcome
how this "xor " solution can't pass test case
🎉Good
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 :)
awsome brother🥸
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
😅😅😅😅😅😅😅
// 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("
");
}
}