Length of Longest Fibonacci Subsequence | Recursion Memo | Bottom Up |Leetcode 873| codestorywithMIK

Subscribers:
92,300
Published on ● Video Link: https://www.youtube.com/watch?v=Ut9cr6Ut4wY



Duration: 0:00
9,237 views
465


iPad PDF Notes - https://github.com/MAZHARMIK/Interview_DS_Algo/blob/master/iPad PDF Notes/Leetcode 873.pdf
Whatsapp Community Link : https://www.whatsapp.com/channel/0029Va6kVSjICVfiVdsHgi1A

Hi Everyone, this is the 107th video of our Playlist "Dynamic Programming : Popular Interview Problems".
Now we will be solving a good Graph problem - Length of Longest Fibonacci Subsequence | Recursion | Memo | Bottom Up | Leetcode 873 | codestorywithMIK

We will start from a beginner's point of view. Build our solution from a simple Recursion and then move to Memoization and then finally to Bottom Up

Problem Name : Length of Longest Fibonacci Subsequence | Recursion | Memo | Bottom Up | Leetcode 873 | codestorywithMIK
Company Tags : will update later
My solutions on Github(C++ & JAVA) - https://github.com/MAZHARMIK/Interview_DS_Algo/blob/master/DP/Length of Longest Fibonacci Subsequence.cpp
Leetcode Link : https://leetcode.com/problems/length-of-longest-fibonacci-subsequence


My DP Concepts Playlist :    • Roadmap for DP | How to Start DP ? | ...  
My Graph Concepts Playlist :    • Graph Concepts & Qns - 1 : Graph will...  
My Segment Tree Concepts Playlist :    • Segment Tree | Introduction | Basics ...  
My Recursion Concepts Playlist :    • Introduction | Recursion Concepts And...  
Trie Playlist -    • Word Search II (Google, Amazon, Meta,...  
Difference Array Technique: Concepts & Qns :    • Introduction | What | How | Differenc...  
My GitHub Repo for interview preparation : https://github.com/MAZHARMIK/Interview_DS_Algo
Instagram : https://www.instagram.com/codestorywithmik/
Facebook : https://www.facebook.com/people/codestorywithmik/100090524295846/
Twitter : https://twitter.com/CSwithMIK
Subscribe to my channel :    / @codestorywithmik  

╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝


Video Summary :
Approach-1 (Recursion + Memoization)
This approach explores all possible Fibonacci-like subsequences using recursion. For each pair (j, k), it checks if a valid previous element exists and recursively finds the longest sequence ending at (j, k). Memoization is used to store results and avoid redundant calculations.

Approach-2 (Bottom-Up)
This approach builds the solution iteratively using a 2D table t[j][k], where each entry stores the longest subsequence ending at (j, k). By iterating over all possible pairs and looking up previous elements efficiently, it constructs the solution in a structured manner.


✨ Timelines✨
00:00 - Introduction
0:39 - Motivation
1:25 - Problem Explanation
5:44 - Thought Process Beginner POV
13:49 - Story To Code
24:41 - Simple Dry Run
28:55 - Time & Space Complexity
30:17 - Coding Recursion
33:52 - Why Memoization
37:02 - Coding Memoization
38:55 - Understand Bottom Up Easily
45:50 - Time & Space Complexity
46:09 - Coding Bottom Up

#MIK #mik #Mik
#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 #leetcode #computerscience #leetcodesolutions #leetcodequestionandanswers #code #learning #dsalgo #dsa #coding #programming #100daysofcode #developers #techjobs #datastructures #algorithms #webdevelopment #softwareengineering #computerscience #pythoncoding #codinglife #coderlife #javascript #datascience #leetcode #leetcodesolutions #leetcodedailychallenge #codinginterview #interviewprep #technicalinterview #interviewtips #interviewquestions #codingchallenges #interviewready #dsa #hindi #india #hindicoding #hindiprogramming #hindiexplanation #hindidevelopers #hinditech #hindilearning #helpajobseeker #jobseekers #jobsearchtips #careergoals #careerdevelopment #jobhunt #jobinterview #github #designthinking #learningtogether #growthmindset #digitalcontent #techcontent #socialmediagrowth #contentcreation #instagramreels #videomarketing #codestorywithmik #codestorywithmick #codestorywithmikc #codestorywitmik #codestorywthmik #codstorywithmik #codestorywihmik #codestorywithmiik #codeistorywithmik #codestorywithmk #codestorywitmick #codestorymik #codestorwithmik




Other Videos By codestorywithMIK


2025-03-07Minimum Recolors to Get K Consecutive Black Blocks | 2 Approaches | Leetcode 2379 | codestorywithMIK
2025-03-06Closest Prime Numbers in Range | 2 Detailed Approaches | Leetcode 2523 | codestorywithMIK
2025-03-05Find Missing and Repeated Values | Mathematical Proof | Leetcode 2965 | codestorywithMIK
2025-03-04Count Total Number of Colored Cells | Maths Proof | 2 Approaches | Leetcode 2579 | codestorywithMIK
2025-03-03Check if Number is a Sum of Powers of Three | Maths Proof | 3 Ways | Leetcode 1780 |codestorywithMIK
2025-03-02Partition Array According to Given Pivot | Multiple Approaches | Leetcode 2161 | codestorywithMIK
2025-03-01Merge Two 2D Arrays by Summing Values | Multiple Approaches | Leetcode 2570 | codestorywithMIK
2025-03-01Nasha hai bhai 🥹
2025-02-27Recursion : The Ultimate Guru 🔥
2025-02-27Aamchi Mumbai, jithe sab kuch possible aahe ❤️
2025-02-26Length of Longest Fibonacci Subsequence | Recursion Memo | Bottom Up |Leetcode 873| codestorywithMIK
2025-02-25Maximum Absolute Sum of Any Subarray | Kadane's Algorithm | Leetcode 1749 | codestorywithMIK
2025-02-24Number of Sub-arrays With Odd Sum | Brute Force | Better | Optimal | Leetcode 1524 |codestorywithMIK
2025-02-23Thoda bed rest lelu ? 🥹
2025-02-22Recovering ❤️‍🩹 🙏
2025-02-22Construct Binary Tree from Preorder and Postorder Traversal | Leetcode 889 | codestorywithMIK
2025-02-22Another Success Story | Microsoft
2025-02-21Recover a Tree From Preorder Traversal | Easy DFS Simulation | Leetcode 1028 | codestorywithMIK
2025-02-20Find Elements in a Contaminated Binary Tree | BFS | DFS | Leetcode 1261 | codestorywithMIK
2025-02-18The k-th Lexicographical String of All Happy Strings of Length n | Leetcode 1415 | codestorywithMIK
2025-02-17Construct Smallest Number From DI String | Easy Approaches | Leetcode 2375 | codestorywithMIK