LeetCode Pascal's Triangle Solution Explained - Java

preview_player
Показать описание


Preparing For Your Coding Interviews? Use These Resources
————————————————————

Other Social Media
----------------------------------------------

Show Support
------------------------------------------------------------------------------

#coding #programming #softwareengineering
Рекомендации по теме
Комментарии
Автор

I love how you quickly go through the algorithm without getting slowed down by overly simplified explanations. Perfect pace. Love it!

noctua
Автор

love and respect from India. there are thousand of teachers/professionals doing the same thing on YouTube, but still you got something which keeps me bounded to this channel.Thank you for making such great explanatory videos.

abhishekpandey
Автор

You should probably use some app to draw pictures or explain like on a whiteboard before getting started with the code. Because, the moment someone sees the code, they are not gonna want to learn the actual concept and try to just copy the solution or mug up the code. Once the concept is clear, people will try to implement in various ways at least. Good job otherwise, but I know you are posting videos for free, here and so can't ask you to invest so much either. Thanks for the video man!

ArjunKalidas
Автор

Great Explanation Nick.. Easy to understand.. Can we can comment this snippet "List<Integer> prev_row = triangle.get(i - 1);", and call the triangle to get the value as "row.add(triangle.get(i - 1).get(j-1) + triangle.get(i-1).get(j));" directly.. doesn't that save memory.

gopishivakrishna
Автор

Big Respect from Ethiopia!, Nick the way you make things as simple as possible but to the very point is just superb!

AdtecBarema
Автор

Thanks a lot @Nick..slow and neat explanation which is understandable for newbies .. please do more leetcode problem videos like this..

harinisivaram
Автор

Pascals Triangle Solved Tip to remember Solve the question first for n=3

anubhav.codess
Автор

Hey nick your algorithm videos are just great.

nidhiverma
Автор

It wasn't first video created by you which helped me.

Thanks for your contribute to my computer education.

kamilkhuzzyatov
Автор

whenever i got an problem, I got your videos explaining them to me

saranshvashisht
Автор

Thanks for sharing! This code is clear and well presented

fangzhang
Автор

Note: Need to use nested loops, outer loop for each row and inner loop for calculating the values. Add 1 before and after the inner loop. Add the first row before looping. Need variables mainly for previous row, current row and the main triangle that we are going to return.

smithcodes
Автор

11^x method

var A=[1, 1, 0]
var B=[0, 1, 1]
Var C= A+B=[1, 2, 1]

Print Var C

Var A=Var C + right append 0
Var B=Var C + left append 0
Var C=A+B=[1, 3, 3, 1]

Print Var C


michaelhunter
Автор

Nick thanks a lot for, the crystal clear explanation. Could you also advise some kind of path/roadmap to be successful in solving such A&DS tasks? I recently completed several courses and read a book Grokking Algorithms, and currently just practicing on Leetcode.

sarvarkhalimov
Автор

If you have a linear way to convert a number's digits to csv values (121 - > 1, 2, 1) then you can just generate the triangle by just multiplying 11 to every row after the first one. Just thought of sharing an alternative. Awesome video as always Nick!

karthik
Автор

Great explanation!! Really loved how you explained everything to the minute details for programming beginners like me. Subbed, thanks!❤

sktergal
Автор

Why do you write row in brackets of the 9 th line

taran
Автор

Hello Nick, thanks for your video, but what is that row means here, since I don’t find any initialize of any thing of that

clot
Автор

Thanks a lot for taking so much effort to explain! It was so well explained

deekshaagrawal
Автор

Iam big big big big fan of u sir🙏🙏 fan from India andhra Pradesh state

arjunsumanth