- 48
- 79 615
Kacy Codes
เข้าร่วมเมื่อ 20 ก.พ. 2022
Just a hero for fun.
LeetCode 1438. Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit
Email: kacycodes@gmail.com
มุมมอง: 1 251
วีดีโอ
LeetCode 2040. Kth Smallest Product of Two Sorted Arrays
มุมมอง 1K2 ปีที่แล้ว
Email: kacycodes@gmail.com
LeetCode 300. Longest Increasing Subsequence - O(n log n)
มุมมอง 5K2 ปีที่แล้ว
Email: kacycodes@gmail.com
LeetCode 300. Longest Increasing Subsequence (Bottom Up DP)
มุมมอง 1242 ปีที่แล้ว
Email: kacycodes@gmail.com
LeetCode 300. Longest Increasing Subsequence (Top Down DP)
มุมมอง 4252 ปีที่แล้ว
Email: kacycodes@gmail.com
LeetCode 225. Implement Stack using Queues (2 queues & 1 queue)
มุมมอง 932 ปีที่แล้ว
Email: kacycodes@gmail.com
LeetCode 818. Race Car - BFS - O( target * log(target) )
มุมมอง 2.8K2 ปีที่แล้ว
Email: kacycodes@gmail.com
LeetCode 4. Median of Two Sorted Arrays - O( log(min(n,m)) )
มุมมอง 3132 ปีที่แล้ว
Email: kacycodes@gmail.com
K-th element of two sorted Arrays - O( log(min(n, m)) )
มุมมอง 2.6K2 ปีที่แล้ว
Email: kacycodes@gmail.com
LeetCode 236. Lowest Common Ancestor of a Binary Tree
มุมมอง 1012 ปีที่แล้ว
LeetCode 236. Lowest Common Ancestor of a Binary Tree
LeetCode 269. Alien Dictionary (Kahn/BFS - Java)
มุมมอง 2862 ปีที่แล้ว
LeetCode 269. Alien Dictionary (Kahn/BFS - Java)
LeetCode 269. Alien Dictionary (DFS - Java)
มุมมอง 3182 ปีที่แล้ว
LeetCode 269. Alien Dictionary (DFS - Java)
LeetCode 210. Course Schedule II - (Kahn's Algorithm / BFS)
มุมมอง 952 ปีที่แล้ว
LeetCode 210. Course Schedule II - (Kahn's Algorithm / BFS)
LeetCode 210. Course Schedule II - (DFS)
มุมมอง 582 ปีที่แล้ว
LeetCode 210. Course Schedule II - (DFS)
LeetCode 207. Course Schedule I - (Kahn's Algorithm / BFS)
มุมมอง 9242 ปีที่แล้ว
LeetCode 207. Course Schedule I - (Kahn's Algorithm / BFS)
LeetCode 208. Implement Trie (Prefix Tree) - Java
มุมมอง 6402 ปีที่แล้ว
LeetCode 208. Implement Trie (Prefix Tree) - Java
LeetCode 314. Binary Tree Vertical Order Traversal
มุมมอง 1.2K2 ปีที่แล้ว
LeetCode 314. Binary Tree Vertical Order Traversal
LeetCode 987. Vertical Order Traversal of a Binary Tree (PriorityQueue + DFS)
มุมมอง 1002 ปีที่แล้ว
LeetCode 987. Vertical Order Traversal of a Binary Tree (PriorityQueue DFS)
LeetCode 285. Inorder Successor in BST (Recursive + Iterative approaches)
มุมมอง 2922 ปีที่แล้ว
LeetCode 285. Inorder Successor in BST (Recursive Iterative approaches)
LeetCode 106. Construct Binary Tree from Inorder and Postorder Traversal
มุมมอง 1372 ปีที่แล้ว
LeetCode 106. Construct Binary Tree from Inorder and Postorder Traversal
EMO !!!
why i can't do something like this: while True: ans = rand7() + rand7() if ans <= 9: return ans + 1
give me your time machine
this is so helpful! love how you count the total subarrays using the left & right bracket!
yeah, I'd totally come up with that on the spot... :')) dp(n^2) solution though, I think so. But I will remember this in case I need it
Simple makes PERFECT!
Thank you so much kacy.
loved it, one of the easiest and best explanation. Thank you !
tqq for this stuff ^^
Thank you for the iterative explanation
Thanks! The editorial did not really explain it and the popular channels stopped at the iterative solution
solved it intuitively using max heap,, but this is more efficient.. alas less obvious to wrap my head around it. thankyou !
this guy is so cool
@@amadhurip9946 😎
The proves were real nice. I was struggling with it. Thanks.
Love you solution (and your voice)
I got this question for amazon's OA and also a question similar to this for IBM's OA on the coding portion so this is a good question to review. Too bad i didnt know how to do it 😭
instead of adding only odd length why are u adding all ?
epic vid! thx!
Good job brother, you explained the whole algo withing the first 4th minute. thank you. keep it up.
omg, the prefix sum explanation was so good
good explanation
is it really hard to grasp or I'm dumb?
I missed why this algorithm is nlogn
I was also initially confused. But this is my understanding: Searching for an element in the pile is logn (binary search). We do this for every element in the array (n). So total complexity is nlogn
Awesome!
Great Explanation! Thank you for such a beautiful explanation!😊😊
Bro u R me Fr
I put this exact code into my IntelliJ IDE and it doesn't work. The power function doesn't work. Any ideas? I am trying to write an asymmetric encryption program and need to figure this out.
How about using two pointers. The first pointer starts from the beginning of each range and increases by 1 until it finds the first pipe and is less than end of range. The second pointer if (left pointer +1) and increases by 1 until it finds a pipe. We add the difference between both the pointers -1 as the current count of the stars. Then, we make the first pointer to start from the second pointer. And the secondpointer starts from firstpointer +1. We always check if the pointers are less than right.
i like your hair, do not you get dandruff !!
Never cause I use anti-dandruff shampoo twice a week 😎
Thanks man, it was very helpful and so much to learn form this video more than what was needed to solve question. Keep up the good work of spreading knowledge
Nice explanation and solution. appreciate your work.
Good solution. I like that you did it with regular arrays makes it easy to transfer the logic to other languages.
Incredible video! really good explanation thanks so much
Very clever explanation. Thank you so much!
Thank you brother beautiful explanation
awesome!
damn bro great explanation please continue doing vedioes
This guy gives off the vibes of a HERO !
Hey Kacy the explanation was so good. Can you teach monotonic queues as well?
Out of all the vides on youtube, I understood your explanation! Thank you!
You know it's a great explanation when you can code and submit the solution for yourself without even reading a single line of code from the instructor lol. Thank you!
You won’t remember the solution today. That day was a short term memory I think. 😬😬
2007 vibes
How did you come up with the idea of choosing the bottom left or top right for calculating the no. of elements <= mid?
Thanks for the clear explanation! Very helpful! 👍
Code Ninja
THANK YOU!!!!!!!
It is very useful. Thanks mate.
Great Kacy...
Great explanation in Java code. Better than some of the Python solution as they use built-in functions that let you "see" the solution as clearly.
Thanks for the explanation, able to understand the logic behind the solution for range addition and related problems, Thanks.