Tap to unmute

N-th Tribonacci Number | 3 Approaches | AMAZON | Leetcode 1137 | codestorywithMIK

  Рет қаралды 2,979

codestorywithMIK

codestorywithMIK

Күн бұрын

Пікірлер: 33
@saanchit1
@saanchit1 8 ай бұрын
Bro 3rd solution was just wow!
@prachikumari5574
@prachikumari5574 7 ай бұрын
Bca final yr....girl.....just want to thank you and I'm starting it today day 1 ....hope I successfully complete and become a good coder thank you❤
@aws_handles
@aws_handles 7 ай бұрын
you are the best bro.
@abhisheksingh-rz8nj
@abhisheksingh-rz8nj 8 ай бұрын
Bro creating Best DSA resources on internet
@fourthdimension6515
@fourthdimension6515 8 ай бұрын
you are the best i have seen
@gui-codes
@gui-codes 7 ай бұрын
Clean and crisp. Thanks
@gauravbanerjee2898
@gauravbanerjee2898 8 ай бұрын
Thanks a lot bhaiya ❤❤
@yuyi-hao
@yuyi-hao 8 ай бұрын
Can you try to explain the log(n) approach too
@anuppatankar4294
@anuppatankar4294 7 ай бұрын
+1
@tutuimam3381
@tutuimam3381 8 ай бұрын
Thanks ❤❤❤❤❤❤❤
@gauravmishra1341
@gauravmishra1341 8 ай бұрын
bhai plz word ladder2 ki video bana dijiye,plz isse graph ki playlist m add kar dijiye
@helloimjavauser
@helloimjavauser 8 ай бұрын
Which writing tool do you use? Like the table? stylus? and also which application?
@AJAYKUMAR-fs1jn
@AJAYKUMAR-fs1jn 7 ай бұрын
Bro try modified Fibonacci with multiple approach and explain Bigint or BigNums
@DevOpskagyaan
@DevOpskagyaan 7 ай бұрын
Thanks a lot
@EB-ot8uu
@EB-ot8uu 7 ай бұрын
Far far better than Bhaiya/Didi paid courses which they are selling on the name of faang
@Redgum-z3i
@Redgum-z3i 7 ай бұрын
i did the third approach without even realizing it was dp
@suvankar54
@suvankar54 8 ай бұрын
sir isme vector dp(n+1,-1) karke The when i pass it to reference to solve function, then runtime error is happening. But when i do vector dp(38,-1) it works But why? We have created dp arrays like using n value, constant value was not mandatory. So is this happening?
@fabhacker
@fabhacker 7 ай бұрын
lets say if n = 1, then if you initialize dp[0],dp[1],dp[2] u will get error as the dp has only 2 storage capacity,i.e, dp[0] and dp[1]. you are initializing dp[2] and it does not exist
@suvankar54
@suvankar54 7 ай бұрын
​@@fabhackerokk thanks,, I tried dp(n+3) and it worked..
@nikhilhaspe2734
@nikhilhaspe2734 7 ай бұрын
thanks man!
@suvigyabasnotra7378
@suvigyabasnotra7378 3 ай бұрын
Only 1 mistake: It's pronounced Tribonacci ( with a 'chi' sound, and not a 'ki' sound ). Kudos for the explanation though. 🙂
@utkarshsahay9908
@utkarshsahay9908 7 ай бұрын
class Solution { public: int t[38]; int tribonacci(int n) { if(n == 0) return 0; if(n 1) return t[n]; return t[n] = tribonacci(n-3) + tribonacci(n-2) + tribonacci(n-1); } };❤❤
@aFirmae
@aFirmae 8 ай бұрын
Ok, ye 1st approach me memo kayse TC ghata raha hai, thora samjha do koi
@yuyi-hao
@yuyi-hao 8 ай бұрын
Memo eliminate the need of recomputaion of values with same parameters make tree diagram and find how many times you have to calculate the Tribonacci number for same xth place
@Sachin-2-9
@Sachin-2-9 8 ай бұрын
aap ise ek example se smjo.. suppose n=6 hai.1st approach ke according fir wo n-1 mtlb 5 ke liye, n-2 mtlb 4 ke liye , n-3 mtlb 3 ke liye call jaaega . again n=5 call marega n-1 mtlb 4 ke liye ,n-2 mtlb 3 ke liye aur n-3 mtlb 2 ke liye ... ab aap dekh skte hai ki subproblem repeate hori hai jaise 4 aur 3 .saare subproblems ke liye process baar baar na krna pde isliye memoize kiye hai. jaise ki agr n=4 ke liye process ho gaya tb uske result ko dp me store kr denge aur kbi future me n=4 ke liye call hoga toh direct dp se uski value return kr denge.
@codestorywithMIK
@codestorywithMIK 8 ай бұрын
Great answer guys
@aFirmae
@aFirmae 7 ай бұрын
Thanks!!
@adityaparab4314
@adityaparab4314 7 ай бұрын
Sir ji 3 approach and no video chapters? What is this Mazhar ji? Haha jk😂 thanks for these amazing solutions keep going!
@gui-codes
@gui-codes 7 ай бұрын
added hai timlines. mujhe dikh rahi hai 🤔
@adityaparab4314
@adityaparab4314 7 ай бұрын
@@gui-codes Yes tabhi nahi dikh rahe the
@adityaparab4314
@adityaparab4314 7 ай бұрын
Thanks Mazhar bhai
@insidious_681
@insidious_681 8 ай бұрын
Sir memorize kaise kra nhi smj aaya
@codestorywithMIK
@codestorywithMIK 8 ай бұрын
Please go through my DP concepts playlist where I have taught Recursion + Memoization etc. it will help a lot ❤️
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 41 МЛН
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
Mastering Dynamic Programming - How to solve any interview problem (Part 1)
19:41
Dynamic Programming isn't too hard. You just don't know what it is.
22:31
DecodingIntuition
Рет қаралды 210 М.
Making an Algorithm Faster
30:08
NeetCodeIO
Рет қаралды 174 М.
Modern Languages Don't Help Solve Hard Problems (Jonathan Blow)
6:45
Big-O Notation - For Coding Interviews
20:38
NeetCode
Рет қаралды 532 М.
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН