Really this guy needs a lot of support.... Thank you for explaining this problem and making me to understand it 😊. Really hats off for your explanation
The explanation is excellent. However I have 2 questions - 1. Why we take right as arr.length and not arr.length-1 , 2. How did we arrive at return left + k?
1. to get a mid value, you are actually looking at the number of elements, and not the index. Thus, right will be the actual array length. 2. adding k to the 'left' will actually land you at the missing number.
Hey Nikhil, Thanks for the awesome explanation. I attempted to come up with a brute-force solution as per the explanation provided in the video to locate the kth positive element, but unfortunately, it's not passing all of the test cases. Could you please share the brute-force implementation of this problem.
@@sumangupta5292 not sure if this answers your question but since we do while(left < right), we need to do right=arr.length before. If you go with arr.length-1, you would go with while(left
The most underrated channel with the best video explanations🙂🙂👍👍
Really this guy needs a lot of support....
Thank you for explaining this problem and making me to understand it 😊.
Really hats off for your explanation
Thanks for all the support and motivation
Though I'm solving LeetCode problems using JavaScript, but can understand it in Java too. Thank you for such great explanations.
Great explanation, thank you!
Thanks for making the video despite the views
Whatever problems Nikhil solves, he makes sure that the concept is explained clearly. 😄
very nice and clear explanation.
The explanation is excellent. However I have 2 questions - 1. Why we take right as arr.length and not arr.length-1 , 2. How did we arrive at return left + k?
1. to get a mid value, you are actually looking at the number of elements, and not the index. Thus, right will be the actual array length.
2. adding k to the 'left' will actually land you at the missing number.
Hey Nikhil, Thanks for the awesome explanation. I attempted to come up with a brute-force solution as per the explanation provided in the video to locate the kth positive element, but unfortunately, it's not passing all of the test cases. Could you please share the brute-force implementation of this problem.
Helped a lot
Thank you ..sir❤❤
Thank you very much
Thanks !
thankyou so much
19:04, 10 July , watching.
Red cloth washed at 18:53,10 July.
Why didn't you take right = arr.length -1;
I have the same question. Generally we take right pointer as arr.length-1
@@sumangupta5292 not sure if this answers your question but since we do while(left < right), we need to do right=arr.length before. If you go with arr.length-1, you would go with while(left
🤩