Pascal's Triangle | Simplest Approach | Application | DRY RUN | Adobe | Amazon | Leetcode - 118

  Рет қаралды 6,743

codestorywithMIK

codestorywithMIK

Күн бұрын

This is the 55th Video on our Array Playlist.
In this video we will try to solve a very famous Problem - Pascal's Triangle (Leetcode-118).
Trust me, this will no longer be a Medium Problem.
I will explain the intuition so easily that you will never forget and start seeing this as cakewalk EASYYY.
We will do live coding after explanation and see if we are able to pass all the test cases.
Problem Name : Pascal's Triangle
Company Tags : Adobe | Amazon
My solutions on Github : github.com/MAZ...
Leetcode Link : leetcode.com/p...
My DP Concepts Playlist : • Roadmap for DP | How t...
My Graph Concepts Playlist : • Graph Concepts & Qns -...
My GitHub Repo for interview preparation : github.com/MAZ...
Subscribe to my channel : / @codestorywithmik
Instagram : / codestorywithmik
Facebook : / 100090524295846
Twitter : / cswithmik
╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
#coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge#leetcodequestions #leetcodechallenge #hindi #india #hindiexplanation #hindiexplained #easyexplaination #interview#interviewtips #interviewpreparation #interview_ds_algo #hinglish #github #design #data #google #video #instagram #facebook

Пікірлер: 56
@codestorywithMIK
@codestorywithMIK Жыл бұрын
********************************* JAVA CODE ******************************************** class Solution { public List generate(int numRows) { List result = new ArrayList(); for(int i = 0; i
@gaddamudayasri6189
@gaddamudayasri6189 10 ай бұрын
It is giving array index out of bound for length 0 as -1 then how to correct it
@abcd76820
@abcd76820 6 ай бұрын
@@gaddamudayasri6189 working fine
@souravjoshi2293
@souravjoshi2293 Жыл бұрын
This channel is better than any paid course out there online. Thank you LEGEND
@Lucifer0872
@Lucifer0872 Жыл бұрын
striver se bhi accha padhaya bhaiya ne
@thekindspill
@thekindspill Жыл бұрын
true
@AlishaKhan-ww3io
@AlishaKhan-ww3io Жыл бұрын
exactly
@ammarshaikh4054
@ammarshaikh4054 Ай бұрын
sach me, striver ne toh pascals triangle ko kaafi complex bana dia, but this guy had made it sooo easyyyyyyy
@siddhi_sb7607
@siddhi_sb7607 Ай бұрын
How beatifully you explained ! 🙌 i skipped this but ab bohot easy lga😁
@bhuppidhamii
@bhuppidhamii 2 ай бұрын
mind blowing, no one has ever taught me this before.
@oqant0424
@oqant0424 Жыл бұрын
Explained it so well The application was lit🔥🔥
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Thank you 😇🙏❤️
@anuppatankar4294
@anuppatankar4294 Жыл бұрын
I have already solved it but still I watched your video an learned its applications
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Means a lot. Thank you for watching😇❤️
@GeniusOG
@GeniusOG Жыл бұрын
Great Explanation 😀 and Thanks for the Application of Pascals Triangle 😀
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Most welcome 😊
@wearevacationuncoverers
@wearevacationuncoverers Жыл бұрын
Better than any other video on KZbin for this problem. Thanks
@surajpandey7533
@surajpandey7533 Жыл бұрын
Nice Explanation sir...
@MadhurChouhan-t4n
@MadhurChouhan-t4n 9 ай бұрын
Thankyou so much dude, your explanation is very clear👍👍💕
@codestorywithMIK
@codestorywithMIK 9 ай бұрын
You're welcome! 🙏❤️😇
@tutuimam3381
@tutuimam3381 Жыл бұрын
Nice Explanation
@rajatsharma6597
@rajatsharma6597 8 ай бұрын
Thanks for the easy to understand approch
@codestorywithMIK
@codestorywithMIK 8 ай бұрын
You are welcome! 🙏
@onesaditya3689
@onesaditya3689 Жыл бұрын
Sir why we use vectorresult(numRows)??
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Hey, It’s because the problem asks to print firsr “numRows” of the Pascal’s triangle.
@prasannakumar898
@prasannakumar898 Жыл бұрын
bro pls make videos on CSES sheet, they r standard problems which will help student massively and you will definetly get a place in heaven xd,dont mind . The work u r doing is great,take a bow !
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Can you share the sheet link ?
@Abhay14
@Abhay14 Жыл бұрын
bhaiya jo sunday ka contest hogga uspr aap video bnaogge ?
@BenJasper-u2x
@BenJasper-u2x Жыл бұрын
buddy do you randomly pick any question from leetcode and solve it right now or your are specifically adding videos in any particular playlist of yours thanks
@BenJasper-u2x
@BenJasper-u2x Жыл бұрын
you do have playlist of almost all data structure have already checked them but i wanted to know your Mind that you following any order right now thanks
@harshmishra7890
@harshmishra7890 Жыл бұрын
These codes are from daily challenge of leetcode
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Hi there, Actually all data structures playlist are present in my playlist. I keep posting qns in all of them one by one. My channel has two types of playlists: 1) Popular Interview qns on a Data Structure/topic 2) Concepts and basic fundamentals of that topic. Example : I have two playlists of Graph and DP one is for qns and other is for concepts building. Please find them in my playlist section. More concepts playlist will be coming soon.
@harshmishra7890
@harshmishra7890 Жыл бұрын
@@codestorywithMIK Sir please also post Java code on your git, just in case I have to take reference for my code
@codestorywithMIK
@codestorywithMIK Жыл бұрын
@harshmishra7890 Noted. Actually i have started adding java code slowly. Will soon be updated for all ❤️😇
@Raj10185
@Raj10185 Жыл бұрын
my implementation :- class Solution { public: vector generate(int n) { vector ans; for(int i =0 ; i < n ; i++) { vector temp(i+1,1); for(int j = 1 ; j < i ; j++) { temp[j] = ans[i-1][j] + ans[i-1][j-1]; } ans.push_back(temp); } return ans; } };
@ugcwithaddi
@ugcwithaddi Жыл бұрын
Legend ❤❤❤
@HealthyOm
@HealthyOm Жыл бұрын
Always love 💕 love
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Means a lot 🙏❤️😇
@HealthyOm
@HealthyOm Жыл бұрын
@@codestorywithMIK ek aur request bhaiya ... 🥲 ... Aap jab bhi koi new Question upload kare and explain kare solutions to Questions ke patterns bhi bataya kijiye .. ki is types ke questions ko aaise solve Kiya jata hain.. and is type ke questions ko Binary search se soch , dp se socho ... Alag se thoda bolenge to .. doubt concepts and many more things clear for us ... Again love love love for ur outstanding explaining tallent 💝
@codestorywithMIK
@codestorywithMIK Жыл бұрын
@omkarpunjaji1256 Noted on this. Thank you so much for this precious suggestion ❤️
@saurabhKumar-hj6yp
@saurabhKumar-hj6yp Жыл бұрын
👏
@RohitYadav-uo6uo
@RohitYadav-uo6uo Жыл бұрын
this question is tagged as DP can you please explain that
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Yes it is a DP approach. Because if you notice, I am able to derive the current solution (result[i][j]) from previous sub solutions - result[i-1][j] and result[i-1][j-1]
@RohitYadav-uo6uo
@RohitYadav-uo6uo Жыл бұрын
@@codestorywithMIK that means dp can be used without recursion too that's one thing i learned new today thank you so much sir
@taneyasoni
@taneyasoni Жыл бұрын
8/30
@pabitrasarkar203
@pabitrasarkar203 Жыл бұрын
sir what about java people?
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Hello There, If you click on the Github link in the description, it has Java code as well in the bottom. Also you can see the Pinned comment, i added java code 😇🙏❤️
@Aman-dh9wz
@Aman-dh9wz Ай бұрын
Heyy bro. ? Can u reply I have to asked some qn .?
@ishwarkoki1119
@ishwarkoki1119 Жыл бұрын
MIK, Pascal - II with O(n) space wala samjh nhi aa rha. ho sake toh bana do vo please
@codeandtalk6
@codeandtalk6 Жыл бұрын
❤❤
@vivek2319
@vivek2319 5 ай бұрын
Bhai, iska Python solution dena please
@dayashankarlakhotia4943
@dayashankarlakhotia4943 Жыл бұрын
Class solution { public List generate(int numRow){ List ans=new Array list (); for(int i=0;i
@Abhay14
@Abhay14 Жыл бұрын
bhai aaj ki video late aaeggi kya ?
@codestorywithMIK
@codestorywithMIK Жыл бұрын
No no. Just being uploaded now. Actually youtube taking time to upload. Will come in next 5 minutes ❤️❤️
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Uploaded - kzbin.info/www/bejne/j6rYqIetjd-Grrssi=ZbhKsO9E-QF5OUAd ❤️😇
Pascal Triangle | Finding nCr in minimal time
26:45
take U forward
Рет қаралды 263 М.
ДЕНЬ УЧИТЕЛЯ В ШКОЛЕ
01:00
SIDELNIKOVVV
Рет қаралды 4 МЛН
Life hack 😂 Watermelon magic box! #shorts by Leisi Crazy
00:17
Leisi Crazy
Рет қаралды 79 МЛН
小天使和小丑太会演了!#小丑#天使#家庭#搞笑
00:25
家庭搞笑日记
Рет қаралды 57 МЛН
LeetCode Pascal's Triangle Solution Explained - Java
9:20
Nick White
Рет қаралды 153 М.
Pascals Triangle| Live Coding with Explanation | Leetcode - 118
9:55
Algorithms Made Easy
Рет қаралды 6 М.
Pascal's Triangle - Leetcode 118 - Python
8:41
NeetCode
Рет қаралды 95 М.
One Effective Trick to Learn Coding Fast (Works in 2024)
4:53
CodeWithHarry
Рет қаралды 338 М.
ДЕНЬ УЧИТЕЛЯ В ШКОЛЕ
01:00
SIDELNIKOVVV
Рет қаралды 4 МЛН