This is absolutely the best explanation on KZitem. Everyone else goes straight to coding and doesn't break down the logic beforehand.
@nikoo28
2 жыл бұрын
Happy that I could help :)
@coldcases_2
6 күн бұрын
sir @nikoo28 ,there is a mistake in two pointer approch i think where if => num1 and num2 are the same (e.g., nums = [3,3], target = 6), so code will return the same index for both numbers, especially if there are duplicates in the original array. for ex nums = [3,3] target = 6 Output [1,1] Expected [0,1] which is wrong so should we apply something else here?
@billyfigueroa1617
7 ай бұрын
Excellent content. This is the second video I watch which allows one to be able to devise a nicer solution simply by sorting the array. The hash map solution is genius and is not complicated I will now, always look at a problem and find out how I can solve it by first thinking "Would sorting this array help to simplify the solution"
@nikoo28
7 ай бұрын
Awesome, thank you!
@billyfigueroa1617
7 ай бұрын
@@nikoo28 you are welcomed
@AKASH-fe6vy
6 күн бұрын
So nice of you to put this in a simple yet insightful manner, thanks a lot.
@ayushtalks2.0
2 жыл бұрын
One of the best way of teaching . Sir Keep posting more videos of dsa. 👍👍
@nikoo28
2 жыл бұрын
Thank you so much for your support :)
@Spear_of_Boudicca
6 күн бұрын
Good video, very similar to my university lectures. I think the reason a lot of people fail to learn some things on their own is that they just see code and want to understand it magically, you need to get the logic behind stuff.
@wenkaiyang1487
10 ай бұрын
thank you soooo much! I checked out so many videos about this question. finally your video helped me out! firmly subscribed to your channel
@Rockstar-16
Жыл бұрын
Sir😄, I have no words, I have never seen anyone explain this nicley, thank you so much❤
@nikoo28
Жыл бұрын
Thank you so much for your kind words.
@sahilhansofficial
Жыл бұрын
Love the way you teach, TYSM☺
@lipovgaming7245
21 күн бұрын
but how do you return 2 elements.
@harihardhik3293
11 ай бұрын
Such a great way of explaining this problem. You have redefined teaching sir!!! Amazing Work!!!!
@nikoo28
11 ай бұрын
Thanks a ton
@AbhishekRamola-u7y
3 ай бұрын
Kudos! Great explanation brother.P.s: Bro, you sound exactly like Pennywise from It.
@sunnyrajesh
5 ай бұрын
Hello I have a small doubt ? How we return two index values here map.get(complement),i); Can any one explain 🤔 does it return complement index and current I value ?
@juledoc_07
Жыл бұрын
I had a question about the tastable, 19-4 is 15, but it is on the table so why don't we stop there? Thank you
@brahmithegod9558
2 жыл бұрын
I was searching for the solution but do not found dryryn but u did it thank bro ❤️
@ashishsonii
29 күн бұрын
Dont stop DSA questions
@bobbysokhi7296
2 ай бұрын
Underrated channel.
@jst8922
8 ай бұрын
06:03 - Method 1: Using Sorting This is basically sliding window solution, when you have two pointers , left and right and you move them correspondingly.
@RajKumar-li8dc
Жыл бұрын
Best way to teach sir plz discuss more question and make a proper playlist ❤❤❤
@nikoo28
Жыл бұрын
Check out my playlists in the channel :)
@YNKeerthi-ry6jx
6 ай бұрын
koko eating banana 875 leetcode question
@nikoo28
5 ай бұрын
It is available now: kzitem.info/news/bejne/q32PvoKmk5OIZYosi=2ftslOTD1LCE8-r2
@sarthakgadge5223
2 ай бұрын
Thanks a lot, I was able to understand this problem thanks to your efforts.
@aman_rockstar31
2 ай бұрын
you r really an excellent teacher one thing i want to tell ur explanation is better that striver thanks for providing such videos
@1tav0
2 жыл бұрын
Thank you for the video it really helped me!
@Samtoosoon
4 ай бұрын
Best
@206_dindayalpatra3
6 ай бұрын
Thank you ❤
@kashmirviews4332
4 ай бұрын
Can anybody tell how to write the main function code for the same function.
@nikoo28
4 ай бұрын
Just create an object of the class and call it in the main method
@kashmirviews4332
4 ай бұрын
@@nikoo28 thanks.
@karthik-varma-1579
5 ай бұрын
AT 10:31 the method is not working for negative numbers in the array;
@nikoo28
5 ай бұрын
the optimized method takes care of all different test cases
@karthik-varma-1579
5 ай бұрын
@@nikoo28 Ohk Thanks Sir
@powerball200
Жыл бұрын
bro plz do in python
@aniketpurohit7601
8 ай бұрын
Amazing
@manjunathakaliwalLife_Atlanta
8 ай бұрын
Good one
@shwetamandal6616
Жыл бұрын
what is this """'' return new int[]{map.get(complement),i}; """" ? as it throws error and i am getting you've used curly brackets with new int[]...................please reply..........................
@nikoo28
Жыл бұрын
It gets the complement pair and then returns it as an array.
@dipanwitasahoo6643
6 ай бұрын
Is this possible using binary search?
@elizabeth00653
4 ай бұрын
Thank you for taking the time to create this video and make a clear explanation
@kishanbhadoriya8701
8 ай бұрын
Thank you very much, finally understood
@AkaNuclear
4 ай бұрын
For the second solution where we are using hashmap, the time complexity of finding an element is also O(n) in case of hash collisions
@nikoo28
4 ай бұрын
For a very big input size, yes there will be collisions…but for the domain of this problem you should be just fine. Good to discuss this with your interviewer though 😄
@shacks-b3b
8 ай бұрын
Please keep uploading DSA/leetcode videos, they all are really helpful, thanks!
@nikoo28
7 ай бұрын
More to come!
@japaneseger
2 жыл бұрын
You explained it very well, best video out there regarding this solution!!"!!!!
@kunalkheeva
2 жыл бұрын
thank you for a great explanation, what would be its space complexity?
@nikoo28
2 жыл бұрын
Which solution do you want the space complexity for? :)
@bivinnandhu781
Жыл бұрын
Thank you bro you do grate things your explanation is very simple and easy to understand Iam so happy to see this video
@nikoo28
Жыл бұрын
so happy to read this
@pooja3711
9 ай бұрын
you are the best.I really appreciate your hard work and step-by-step approach to how to overcome with a solution. Hats off
@nikoo28
9 ай бұрын
thanks for the appreciation and motivation :)
@malkitsaggu
Ай бұрын
Best explanation 👌
@im_andre6dev56
9 ай бұрын
Hi Nikhil, what program do you use to draw the solution?
@nikoo28
9 ай бұрын
GoodNotes 6
@joshuajacobs6855
Жыл бұрын
Only just got into coding a few days ago coming from a teacher background. Great explanations!
@yowanehakuuu
Жыл бұрын
I watched two other videos before coming here , to be honest you are the best one . I only understand from you because other people talk too long without explaining they talk about the problem not the solution. You even taught me the math side of this . Thank you , I subscribed. I will watch the rest of the solutions
@nikoo28
11 ай бұрын
I prefer to focus on the problem. Language is a tool anyway, and they will keep changing and evolving. Thanks for the sub!!
@sushant3530
2 жыл бұрын
Sir will 3rd Method will work if array has Duplicate elements . Becoz in HashMap , the key cannot be duplicate. And if array elements repeats , they duplicate key is found. PLZZZZ PLZZ EXPLIAN THIS SIR
@nikoo28
2 жыл бұрын
since the problem says you will have EXACTLY ONE SOLUTION, you do not need to worry about duplicate number. Because if a duplicate number exists, then you will have 2 possible solutions...and hence that is not a valid scenario.
@ashishkumaryadav7701
Жыл бұрын
@@nikoo28 but in the example there is repetitive element
@RapJunkie
3 ай бұрын
@@nikoo28 we have a valid scenario [3,3], and this method won't work :(
@dineshpatil6698
2 жыл бұрын
such clear explantion , subscribed
@TV-wk7oo
Жыл бұрын
Thank you, you are the best! Visualizing the code helped me a lot
@nikoo28
Жыл бұрын
You're welcome!
@pulastyadas3351
2 жыл бұрын
awesome explanation..keep teaching us
@ymhuang651
Жыл бұрын
Awesome channel! Why I Find it so late?
@nikoo28
Жыл бұрын
Glad I could help you 😄
@girdharipatel2
Жыл бұрын
your explanation is for more better than other youtuber
@nikoo28
Жыл бұрын
Glad you feel that way :D
@anchalsoni8614
3 жыл бұрын
awesome video... keep making them
@sanjeewagunarathna1990
2 жыл бұрын
Great video best explanation
@ganesang7217
10 ай бұрын
its cool
@ME022GopinathanAsokan
9 ай бұрын
sir what language you are used here
@nikoo28
9 ай бұрын
Java
@prakharpathak5899
Жыл бұрын
Very smooth sir
@04.nehalsingh12
2 жыл бұрын
awesome tutorial sir
@Programming-for-all-u2l
8 ай бұрын
I do not know why he gets very few likes and he is the best teacher for explaining the leetcode problems
@nikoo28
7 ай бұрын
so happy you believe in me. Please share the videos if possible. Trying my best with SEO to get ranked up in search results.
@ashishsonii
29 күн бұрын
Brother don't stop making leetcode questions@@nikoo28
@IorgaArtStudio
3 жыл бұрын
subbed!
@abhinavd2
Жыл бұрын
100
@KaisarAnvar
Жыл бұрын
You're by far the most detailed explainer I've seen. I've seen a few, but you're really amazing. Having a coding interview soon.
Пікірлер: 93