filmov
tv
Leetcode 975. Odd Even Jump Detailed Explanation + Coding (Python)

Показать описание
In this video, I walk through, from start to finish, how to do LeetCode 975. Odd Even Jump. This is a HARD difficulty question that was most notably used in a past Google online assessment. I walk through a O(nlogn) time + O(n) memory dynamic programming x stack solution in excruciating detail. At the end, I code up the solution using Python.
PS: Please excuse the sounds in the background. I was recording while construction was happening nearby.
▬ Contents of this video ▬▬▬▬▬▬▬▬▬▬
00:00 Intro
00:35 Reading the question
08:35 Making observations about the question
10:54 Going over an example
19:00 Brute-force algorithm + big-O analysis
21:32 How to make next odd/even jump efficient
24:06 Memoizing next jump indices
35:07 Big-O analysis of memoization
38:01 How to make recursive jumps efficient
41:22 Using DP to avoid repeated recursion
52:28 Coding up the solution (Python3)
▬ About Algorithms Simplified ▬▬▬▬▬▬
I am a software engineer and computer science student who specializes in mathematics, logic, and algorithms. When I was a 2nd-year university student, despite having only *started* programming for 6 months before my first interview, I received multiple FAANG + other software engineering offers following my interview rounds due to my strength in algorithms. I’d like to bring both my passion for mathematical logic and experience interviewing for software engineering roles to you, the viewers, so that you may be better prepared for your next coding interview.
On this channel, I walk through Leetcode interview questions in excruciating detail, so that you can really understand, not memorize. If you enjoy these walkthroughs and explanations, please consider subscribing, as these videos take a lot of work.
▬ Social Media ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
PS: Please excuse the sounds in the background. I was recording while construction was happening nearby.
▬ Contents of this video ▬▬▬▬▬▬▬▬▬▬
00:00 Intro
00:35 Reading the question
08:35 Making observations about the question
10:54 Going over an example
19:00 Brute-force algorithm + big-O analysis
21:32 How to make next odd/even jump efficient
24:06 Memoizing next jump indices
35:07 Big-O analysis of memoization
38:01 How to make recursive jumps efficient
41:22 Using DP to avoid repeated recursion
52:28 Coding up the solution (Python3)
▬ About Algorithms Simplified ▬▬▬▬▬▬
I am a software engineer and computer science student who specializes in mathematics, logic, and algorithms. When I was a 2nd-year university student, despite having only *started* programming for 6 months before my first interview, I received multiple FAANG + other software engineering offers following my interview rounds due to my strength in algorithms. I’d like to bring both my passion for mathematical logic and experience interviewing for software engineering roles to you, the viewers, so that you may be better prepared for your next coding interview.
On this channel, I walk through Leetcode interview questions in excruciating detail, so that you can really understand, not memorize. If you enjoy these walkthroughs and explanations, please consider subscribing, as these videos take a lot of work.
▬ Social Media ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Комментарии