This is a very very good question I'd say and I'll recommend everyone to pick up pen and paper to come to the conclusion behind the 2 that is being multiplied to every term starting f(n-3). There are a lot of concepts involved here. The crux is that you don't want to jump to the condition that is already being taken care of in the base cases (f(1), f(2) and f(3)).
how to grab above approach quickly : 1 ) watch full video understand it. 2) time take a book and dry run along with him. 3) Code yourself after understanding.
@@CodeWithSunchitDudeja Yes sir, I am a frequent viewer of your videos. Whenever I m unable to come up with an optimized solution of any LC problem, irrespective of daily challenge, your explanation is there for rescue. xD Moreover, I am even in your LinkedIn connection. Thanks for making these contents despite your daily professional life...
I pray to god these kinda questions don't pop in my interview. Btw how on earth do ya'll think soooo deeep mathematically. Isme DP kam math zyaada use hui hai.
it's very hard to come up with the solution at first glance for problems like this.
The step by step explanation was amazing. I would understand it even if I had no idea about algorithms and DP. good job!!!
Glad you enjoyed it!
For N= 4. The number of ways Tromino Tile + Domino Tile combinations can be 4, TD(upper empty space)T, TD(lower empty space)T, TTD, DDT, correct ?
For N=4 the result is 11 ie 5 (only dominoes) + 6 ( domino and tromino ). Correct me if I am wrong.
Sir you have multiplied by 2 after n-3 because for every case two possible ways are coming right??
Yes exactly the result of n-3 can be used in 2 ways using tromino
@@CodeWithSunchitDudeja Thank you sir for reply ....your explanations are seriously worthy ...liked it
Best one on google! thnx.
when n==4 then why can not we place one L then inverted L and then a vertical domino tile ?
This is a very very good question I'd say and I'll recommend everyone to pick up pen and paper to come to the conclusion behind the 2 that is being multiplied to every term starting f(n-3). There are a lot of concepts involved here. The crux is that you don't want to jump to the condition that is already being taken care of in the base cases (f(1), f(2) and f(3)).
Your explanations never disappoint. Thankyou
Glad you like them!
how to grab above approach quickly :
1 ) watch full video understand it.
2) time take a book and dry run along with him.
3) Code yourself after understanding.
Absolutely
We are removing duplicates when N=2 while calculating equations but for N-3 and N-4 we are not. Does not seems to be logical to me
Wonderful explanation...
Your efforts are commendable
Thank, however in past over one and half years I have published 432 videos, have not got that much traction yet. These comments keep me moving.
@@CodeWithSunchitDudeja Yes sir, I am a frequent viewer of your videos. Whenever I m unable to come up with an optimized solution of any LC problem, irrespective of daily challenge, your explanation is there for rescue. xD
Moreover, I am even in your LinkedIn connection.
Thanks for making these contents despite your daily professional life...
@@CodeWithSunchitDudeja probably new users are increasing but people only visit this channel when they really are not able to solve hence...
I pray to god these kinda questions don't pop in my interview. Btw how on earth do ya'll think soooo deeep mathematically. Isme DP kam math zyaada use hui hai.
Great explanation, thank you! looking forward to more videos from this channel!
Awesome explanation
Keep watching
great explanation ! it was not easy to understand
dp[n-2]+dp[n-3]+2*(dp[n-4]+...+dp[0]) = dp[n-1], Can anybody please help me to understand it?
wapas video dekh samajh aajaayega.
Bro keep n-1 in n in the expression dp(n) and check ====> dp(n) becomes dp(n-1) and all rhs go from n to n-1
@@bhargav4g538 Thanks!!
Dear lord. Who asks such Q in SW interview 😢.
haha