- 104
- 11 730
Darryl Tanzil
เข้าร่วมเมื่อ 3 เม.ย. 2010
Computer science & business undergrad @ UBC
Check Completeness of a Binary Tree - O(n) time O(n) space
Check Completeness of a Binary Tree - O(n) time O(n) space
มุมมอง: 20
วีดีโอ
Lowest Common Ancestor of a Binary Tree I - O(n) time O(n) space
มุมมอง 1921 วันที่ผ่านมา
Lowest Common Ancestor of a Binary Tree I - O(n) time O(n) space
Shortest Path in a Binary Matrix - O(n) time O(n) space
มุมมอง 8421 วันที่ผ่านมา
Shortest Path in a Binary Matrix - O(n) time O(n) space
Random Pick with Weight - O(n) time O(n) space
มุมมอง 9328 วันที่ผ่านมา
Random Pick with Weight - O(n) time O(n) space
Lowest Common Ancestor of a Binary Tree III - O(h) time O(1) space
มุมมอง 62หลายเดือนก่อน
Clarification point: In the worst case, each node can traverse the height of the tree h (i.e., if one node is at the deepest level of the tree and the other is at another level). However, since each node travels a distance of at most 2h (moving up to the root and switching to the other node's position if needed), the overall complexity remains O(h).
Nested List Weight Sum - O(n) time O(n) space with BFS
มุมมอง 21หลายเดือนก่อน
Nested List Weight Sum - O(n) time O(n) space with BFS
ReCall Memory Assistent - Waterloo's HTN 1st/1893 for LLM prize
มุมมอง 100หลายเดือนก่อน
ReCall Memory Assistent - Waterloo's HTN 1st/1893 for LLM prize
Binary Tree Vertical Order Traversal - O(n) time O(n) space
มุมมอง 131หลายเดือนก่อน
Binary Tree Vertical Order Traversal - O(n) time O(n) space
All Nodes Distance K in Binary Tree - O(n) time O(1) space
มุมมอง 84หลายเดือนก่อน
All Nodes Distance K in Binary Tree - O(n) time O(1) space
Valid Palindrome II - O(n) time O(1) space
มุมมอง 13หลายเดือนก่อน
Just wanted to further clarify - the reason it's O(1) space is because the recursion depth only goes at most once, because we have one retry. We can consider it a function of x where x is the amount of characters able to be omitted.
Minimum Remove to Make Valid Parenthesis - O(n) time O(n) space
มุมมอง 61หลายเดือนก่อน
Minimum Remove to Make Valid Parenthesis - O(n) time O(n) space
Valid Word Abbreviation - O(n +m) time O(1) space
มุมมอง 282 หลายเดือนก่อน
Valid Word Abbreviation - O(n m) time O(1) space
[Mock] Step by Step Directions from a Binary Tree Node to another
มุมมอง 366 หลายเดือนก่อน
[Mock] Step by Step Directions from a Binary Tree Node to another
Longest Substring without repeating characters - O(n) time and space
มุมมอง 236 หลายเดือนก่อน
Longest Substring without repeating characters - O(n) time and space
Valid Sudoku - O(1) time and O(1) space
มุมมอง 2266 หลายเดือนก่อน
Valid Sudoku - O(1) time and O(1) space
[Mock Interview] Surrounded Regions - O(n*m) time and space by inversing
มุมมอง 396 หลายเดือนก่อน
[Mock Interview] Surrounded Regions - O(n*m) time and space by inversing
Maximal Network Rank - O(n+m^2) time, O(n) space
มุมมอง 166 หลายเดือนก่อน
Maximal Network Rank - O(n m^2) time, O(n) space
Number of Islands - O(m*n) time and space
มุมมอง 276 หลายเดือนก่อน
Number of Islands - O(m*n) time and space
Find the index of first occurrence in string - Time O(n) Space O(1)
มุมมอง 406 หลายเดือนก่อน
Find the index of first occurrence in string - Time O(n) Space O(1)
Minimum time to make rope colorful - O(n) time and space
มุมมอง 176 หลายเดือนก่อน
Minimum time to make rope colorful - O(n) time and space
Maximum Number of Balloons - O(n) time and space
มุมมอง 356 หลายเดือนก่อน
Maximum Number of Balloons - O(n) time and space
[Free-style] Word Search - time O(m * n * 4^w) space O(w)
มุมมอง 366 หลายเดือนก่อน
[Free-style] Word Search - time O(m * n * 4^w) space O(w)
Subsets - Backtracking O(2^n) time, O(n) space
มุมมอง 307 หลายเดือนก่อน
Subsets - Backtracking O(2^n) time, O(n) space
Palindrome Partitioning - Backtracking O(2^n) time
มุมมอง 847 หลายเดือนก่อน
Palindrome Partitioning - Backtracking O(2^n) time
Last Stone Weight - O(n*log(n)) time, O(n) space with maxheap
มุมมอง 137 หลายเดือนก่อน
Last Stone Weight - O(n*log(n)) time, O(n) space with maxheap
Minimum Operations to Reduce X to Zero - Sliding Window O(N) time O(1) space
มุมมอง 157 หลายเดือนก่อน
Minimum Operations to Reduce X to Zero - Sliding Window O(N) time O(1) space
Great Explanation
nice
darryl saved me and my 6 hamsters from a burning building 2 years ago, i highly recommend you learn the lowest common ancestor of a binary tree in O(n) time and O(n) space from him
thanks to this video i was able to do simplify path in O(n) time and O(n) space, my dad will finally look me in the eye again, and my wife's boyfriend let me play the PS4 with him! you're the best!
Yo subbed🙌
How is it O(1)? You are initialising the dicts using 2 for loops which makes it O(m*n) or O(n^2)
Sorry just saw this now! I interpreted it as O(1) because the sudoku dimensions is always 9x9, so it will remain constant as O(81) - if there was a modification wherein the size of the sudoku board would change I would change how I described it. You are correct though, if m and n are the lengths it could also be described as O(m*n)
👍
this shit ass yo
This video is different then my typical videos- just doing a freestyle mock interview with my friend 😄
first
🔥🔥🔥
😭😭😭 LOL
For the space complexity, if you don't consider the space allocated for result, then it should be O(n), because you just use an array to store the intermediate result
hey Darryl lets go Nice bro One Day we will collaborate on some video
Honestly, the video quality is great and the explanation is great. Keep going man!!
Thanks so much 😄I'll keep motivating myself!
Also, the adding function is O(log(n)); I mistakenly said it was O(1) in the video
Also the reason why the add function wasn't working before was due to it not guaranteeing that the length of the minheap would remain the same afterwards.
At 0:20 I mentioned that these problems have to be done in O(1)- they're not, I think I was just tired from work today LOL
If the problems on datacurve aren't as high quality as on LC, I might consider switching back to leetcode until I'm confident I can spot faulty questions fast!
Nice catch!
Impressive, congrats guys 🔥
Link to Github repo: github.com/darryltanzil/spot-boston-dynamics
Apologies for the lack of video footage for this one- school's been busy and I have a few interviews I'm prepping for, so my posting has been more erratic. Once I get school and my interviews out of the way, I'll return to a consistent uploading schedule!
My computer was experiencing lag while recording this video, which I didn't notice until post-production. The audio explanation may be of some use still so I'll continue to keep this up!
very good i will get into google with this information
Google stands no chance against u 😎
Apologies again for lower mic quality and resolution! Once I complete my audio setup at UBC, the quality will return back to normal.
thanks <3
My mic was bugging out in this video- will fix for next time!
I love that you set new goals for your videos in the comments. Keep up the good work!
@@SkilledAppleThanks for watching and for the encouraging words 😄
good job bro keep going👍
Thank you 😄 I’ll keep going at it!
Audio issues while recording- these will be fixed in any subsequent videos!
There was an audio issue with my computer- I'll have it fixed for the next videos!
now do the entire bee movie script
Your voice is so relaxing
Thanks your explanation was really helpful!
Advice from Lincoln: Good: - I verified with interviewer that solution was valid before coding Improvements: - Should be looking at examples to gather details, not to see if my pre-emptive solution would be valid - Use small examples to figure out edge cases - Verify constraints with interviewer before beginning - Shouldn't be adding null values to a stack during iterative DFS, can use if guard to check for left and right values
For me to improve next time: Bad habit of writing code without fleshing out algorithm, would have saved me a lot of hiccups- will make sure to focus on next video
Good point!
As I prepare to graduate next year, I'm getting more practice on leetcode in prep for the tech interviews. Seeing these mock tech interviews is actually very helpful to see how people think through their problem solving out loud!
Glad it was helpful 😄 the goal is to improve the talking process with every iteration
Promo*SM 🎊
Either you mistyped "space" and "time", you dont understand how O works or I'm a complete idiot
You're right it was a mistype, switching it rn 💀
thank u bro thank u very very much my phone was display green screen for two day I am very thankful to u for this help I am very happy
Thanks a lot for this excellent tip. It saved my day.