Valid Sudoku - LeetCode 36 - Java
15:28
Missing Number - LeetCode 268 - Java
8:56
Rotate Image - LeetCode 48 - Java
24:51
Two Sum - LeetCode 1 - HashMap - Java
14:25
Пікірлер
@vamsiswaroopv549
@vamsiswaroopv549 19 күн бұрын
Very simple and easy to understand approach. Really appreciate this effort from your side
@LeetCodeUniversity
@LeetCodeUniversity 19 күн бұрын
Thank you. I am glad you found it helpful!
@vamsiswaroopv549
@vamsiswaroopv549 25 күн бұрын
Simple and Handy explanation. Thank You
@LeetCodeUniversity
@LeetCodeUniversity 24 күн бұрын
Thank you, glad I was of help!!
@anandsinha1063
@anandsinha1063 Ай бұрын
Why you have used strings in hash set
@Emanuel-yb3qk
@Emanuel-yb3qk Ай бұрын
Thanks for the video.
@LeetCodeUniversity
@LeetCodeUniversity Ай бұрын
My pleasure!
@davidabdhir780
@davidabdhir780 Ай бұрын
Your channel is so underrated brother. You deserve so much more recognition and subscribers. This content is gold. Thank you so much.
@LeetCodeUniversity
@LeetCodeUniversity Ай бұрын
This truly means a lot. Thank you!
@swapnil72
@swapnil72 Ай бұрын
I did not understand why use the second while loop?
@saleheen12
@saleheen12 Ай бұрын
Thanks. Only explanation I understood.
@LeetCodeUniversity
@LeetCodeUniversity Ай бұрын
I am glad I was able to help!
@amitghosh5
@amitghosh5 2 ай бұрын
this was great. I have immediately subscribed
@LeetCodeUniversity
@LeetCodeUniversity 2 ай бұрын
Thank you so much!!
@ukpauchechi
@ukpauchechi 2 ай бұрын
Thanks for this explanation, wish I could give this more than one thumbs up😊
@LeetCodeUniversity
@LeetCodeUniversity 2 ай бұрын
You are so kind. Thank you and glad it was helpful!!
@_4p_
@_4p_ 2 ай бұрын
Thanks
@chadsmith71
@chadsmith71 2 ай бұрын
very good. I am now a subscriber. great work.
@LeetCodeUniversity
@LeetCodeUniversity 2 ай бұрын
Appreciate that!
@Jack-ke3wm
@Jack-ke3wm 2 ай бұрын
As always, this has been extremely detailed and beautifully explained!!
@LeetCodeUniversity
@LeetCodeUniversity 2 ай бұрын
Thank you! Glad it was helpful!
@RamPageMMA
@RamPageMMA 2 ай бұрын
LCU is back!!!!!!!!!!!!! 🎉👏
@LeetCodeUniversity
@LeetCodeUniversity 2 ай бұрын
Glad to be back!!!
@RohanKumar-nx2ry
@RohanKumar-nx2ry 2 ай бұрын
this is what i expect from my teacher anyways you teach really good bro😀
@LeetCodeUniversity
@LeetCodeUniversity 2 ай бұрын
Thank you! I absolutely love to teach, glad you found it helpful!
@ranjitasahu19
@ranjitasahu19 2 ай бұрын
This is so good approach, thanks a lot.
@LeetCodeUniversity
@LeetCodeUniversity 2 ай бұрын
Glad it was helpful!
@RamPageMMA
@RamPageMMA 2 ай бұрын
dude, you made this problem look easy. Absolutely amazing explanation.
@RamPageMMA
@RamPageMMA 2 ай бұрын
For the reversing part, I tried to reverse each row using two pointer technique. example: for (int i = 0; i < matrix.size(); i++) { int left = 0; int right = matrix[i].size() - 1; while (left < right) { swap(matrix[i][left], matrix[i][right]); left++; right--; } } I utilized the same "swap()" method when transposed the matrix.
@RamPageMMA
@RamPageMMA 2 ай бұрын
Here is the full code: class Solution { public: void swap(int &a, int &b) { int temp = a; a = b; b = temp; } void rotate(vector<vector<int>> &matrix) { // transpose matrix for (int row = 0; row < matrix.size(); row++) { for (int col = row; col < matrix[row].size(); col++) { swap(matrix[row][col], matrix[col][row]); } } // reverse each row after transposed for (int i = 0; i < matrix.size(); i++) { int left = 0; int right = matrix[i].size() - 1; while (left < right) { swap(matrix[i][left], matrix[i][right]); left++; right--; } } } };
@LeetCodeUniversity
@LeetCodeUniversity 2 ай бұрын
Thank you very much! Glad it was of help to you!
@KittyInCali
@KittyInCali 2 ай бұрын
I went over multiple videos, this was by far the best explanation
@LeetCodeUniversity
@LeetCodeUniversity 2 ай бұрын
Thank you! Glad it was helpful!
@AanchalSharma-e4e
@AanchalSharma-e4e 3 ай бұрын
please upload more questions
@LeetCodeUniversity
@LeetCodeUniversity 2 ай бұрын
I will!
@fjose8712
@fjose8712 4 ай бұрын
Is it not simpler to use logarithms? Logarithms convert addtion to multiplication, so we don't need the + symbol...
@alastairhewitt380
@alastairhewitt380 4 ай бұрын
Fantastic explanation Edit: In the while loop, if I only write p1 >= 0, then I get an index out of bound error, but if I include the logic for p1 & p2 then the code up until that point works properly. I am not really sure why that is since m & n are both 3. Can someone please help explain what I am not seeing? To me it is the same thing
@kousthubganugapati7193
@kousthubganugapati7193 4 ай бұрын
will this work for every array
@LeetCodeUniversity
@LeetCodeUniversity Ай бұрын
For sure!
@nautilus2024
@nautilus2024 5 ай бұрын
wow, awesome !
@TheMLGYeet
@TheMLGYeet 5 ай бұрын
Great job explaining the while loop conditions.
@LeetCodeUniversity
@LeetCodeUniversity 5 ай бұрын
Thank you!
@musamehdiyevv
@musamehdiyevv 5 ай бұрын
Thank you for the explanation. I think this code is simpler: class Solution { public void merge(int[] nums1, int m, int[] nums2, int n) { int p = m + n - 1; int p1 = m - 1; int p2 = n - 1; while (p2 >= 0) { if (p1 >= 0 && nums1[p1] > nums2[p2]) { nums1[p] = nums1[p1]; p1--; p--; } else { nums1[p] = nums2[p2]; p2--; p--; } } } }
@sarahussain7248
@sarahussain7248 6 ай бұрын
Thank you, your explanation is amazing ❤
@LeetCodeUniversity
@LeetCodeUniversity 6 ай бұрын
I appreciate that! That was my first video. I highly suggest you see the rest if you liked this one. They only got better!
@legna516
@legna516 6 ай бұрын
Please continue your content, much appreciated! Liked and subscribed.
@LeetCodeUniversity
@LeetCodeUniversity 6 ай бұрын
I really appreciate you!
@StfuSiriusly
@StfuSiriusly 7 ай бұрын
great explanation, I was hoping to find more but this seems to be your last video. Any plans to make more?
@LeetCodeUniversity
@LeetCodeUniversity 7 ай бұрын
Thank you so much! Yes, I might come back to doing them. At least, I hope the videos I have helped you become a little better!
@1murkeybadmayn
@1murkeybadmayn 7 ай бұрын
I would prefer you wrote the explanation while writing the code because you did not show what happens when there is a carry i.e. when it does not equal 0 in the previous explanation. The while loop condition says while carry is not 0 so now I am confused if the carry is a single digit. Edit: In fact, I found from chatgpt that 6 + 6 does have a carry but you reversed the operations so that confused me.
@athenkosimamfengu8259
@athenkosimamfengu8259 8 ай бұрын
You just got yourself a new follower. What a beautiful beautiful explanation, wow
@LeetCodeUniversity
@LeetCodeUniversity 8 ай бұрын
I really appreciate that!!
@Well2388
@Well2388 8 ай бұрын
So straightforward and easy to understand!Thanks a lot!
@suiryakumaran2034
@suiryakumaran2034 9 ай бұрын
Great Explanation. Thank you so much.
@lakhanshanker6105
@lakhanshanker6105 9 ай бұрын
Can we do product of all the elements of the array and divide it by the nums[i] ?
@me-giridhar
@me-giridhar 9 ай бұрын
great!!!!!!!!!!
@mirriammaina6860
@mirriammaina6860 10 ай бұрын
Isn't time complextity worst case scenario? Worst case for this code is 2 loops for each num without a sequence since we always start at num + 0. I don't understand how this is O(n) time complexity
@162sujiths4
@162sujiths4 11 ай бұрын
Short and crisp 👏
@LeetCodeUniversity
@LeetCodeUniversity 11 ай бұрын
Thank you!
@lobvida7630
@lobvida7630 11 ай бұрын
great video. amazing detail in the demonstration
@LeetCodeUniversity
@LeetCodeUniversity 11 ай бұрын
Thank you!
@lobofloyed
@lobofloyed 11 ай бұрын
Good explaination. I do wish you had continued and completed all 75 questions.
@observer861
@observer861 Жыл бұрын
one of the rare videos where the instructor not only is good at solving but also, and more importantly in this case, explaining the solution
@LeetCodeUniversity
@LeetCodeUniversity Жыл бұрын
I really appreciate your kind words!
@observer861
@observer861 Жыл бұрын
@@LeetCodeUniversity i wish you could do all 150 top interview questions ;)
@LeetCodeUniversity
@LeetCodeUniversity Жыл бұрын
@@observer861I have to get back to it for sure!
@sudhareddy1
@sudhareddy1 4 ай бұрын
@@LeetCodeUniversity +1 looking for top 15o interview questions
@hoang640
@hoang640 Жыл бұрын
Thank you for very well explaination
@LeetCodeUniversity
@LeetCodeUniversity Жыл бұрын
Thank you!
@shobhanathsharma2113
@shobhanathsharma2113 Жыл бұрын
Very simple and intuitive explanation. Really appreciate it
@LeetCodeUniversity
@LeetCodeUniversity Жыл бұрын
Thank you!
@wajihakhan8618
@wajihakhan8618 Жыл бұрын
why you used while loop in line 11 can you explain this?
@bobzero3727
@bobzero3727 Жыл бұрын
That was great
@LeetCodeUniversity
@LeetCodeUniversity Жыл бұрын
Thank you!
@nivealokhande2153
@nivealokhande2153 Жыл бұрын
Thanks for such an awesome explanation
@LeetCodeUniversity
@LeetCodeUniversity Жыл бұрын
You are very welcome my friend!
@codeforfreedom
@codeforfreedom Жыл бұрын
Brother, thank you so much! That's the most clear explanation I've seen so far searching for XOR understanding in youtube. Very much appreciated.
@LeetCodeUniversity
@LeetCodeUniversity Жыл бұрын
I really appreciate that! Thank you 🙏
@sethuprathapan4388
@sethuprathapan4388 Жыл бұрын
there is a loop present , so how its become constant time complexity? can u please clarify my doubt?
@udaypandey5659
@udaypandey5659 11 ай бұрын
because this loop will always do operation for 32 times. so here 32 is fixed , so if some thing is fixed we say it constant time
@melanieprevot4926
@melanieprevot4926 Жыл бұрын
Nice approach ! Thank you for sharing.
@LeetCodeUniversity
@LeetCodeUniversity Жыл бұрын
You are very welcome!
@ajaykumar-yk7to
@ajaykumar-yk7to Жыл бұрын
sir very good explanation really. if they have have like[1,1,2,2,3,4] what the output sir they are two single numbers there here
@anuradhae9146
@anuradhae9146 Жыл бұрын
can you please do th Pascal's Triangle II-119
@anuradhae9146
@anuradhae9146 Жыл бұрын
This is the best code I could find. I really like the way you explain and how to reach solution. Keep it up! thanks lot!!
@LeetCodeUniversity
@LeetCodeUniversity Жыл бұрын
Thank you so much!