- 209
- 178 983
DeepCodes
India
Registrace 27. 05. 2019
LeetCode solutions with straightforward explanations and examples after the contest ends. Subscribe to the channel if you like my style of explaining.
About Me: Working as Associate Software Engineer.
About Me: Working as Associate Software Engineer.
688. Knight Probability in Chessboard | DP | C++ | LeetCode Daily Challenge
leetcode.com/problems/knight-probability-in-chessboard/description/
0:00 - Question Understanding
7:00 - Recursion
8:55 - Memoization Dry Run
#coding #dsa #leetcode #daily #programming #cpp #tutorial
0:00 - Question Understanding
7:00 - Recursion
8:55 - Memoization Dry Run
#coding #dsa #leetcode #daily #programming #cpp #tutorial
zhlédnutí: 1 229
Video
1751. Maximum Number of Events That Can Be Attended II
zhlédnutí 1,1KPřed rokem
leetcode.com/problems/maximum-number-of-events-that-can-be-attended-ii/description/ 0:00 - Question Understanding 5:00 - Intuition 8:15 - Code #coding #dsa #leetcode #daily #programming #cpp #tutorial
802. Find Eventual Safe States
zhlédnutí 540Před rokem
leetcode.com/problems/find-eventual-safe-states/description/ 0:00 - Question Understanding 4:50 - Approach 1 14:45 - Approach 2 #coding #dsa #leetcode #daily #programming #cpp #tutorial
863. All Nodes Distance K in Binary Tree | Trees
zhlédnutí 585Před rokem
leetcode.com/problems/all-nodes-distance-k-in-binary-tree/description/ 0:00 - Question Understanding 2:10 - Approach 1 7:20 - Approach 2 #coding #dsa #leetcode #daily #programming #cpp #tutorial
2024. Maximize the Confusion of an Exam
zhlédnutí 748Před rokem
leetcode.com/problems/maximize-the-confusion-of-an-exam/description/ #coding #dsa #leetcode #daily #programming #cpp #tutorial
137. Single Number II | Bit Manipulation
zhlédnutí 2,2KPřed rokem
leetcode.com/problems/single-number-ii/description/ 0:00 - Question Understanding 1:50 - Approach 6:25 - Code #coding #dsa #leetcode #daily #programming #cpp #tutorial
1601. Maximum Number of Achievable Transfer Requests | Bit Manipulation
zhlédnutí 1,4KPřed rokem
leetcode.com/problems/maximum-number-of-achievable-transfer-requests/ 0:00 - Question Understanding 5:50 - Approach 1 13:15 - Approach 2 #coding #dsa #leetcode #daily #programming #cpp #tutorial
864. Shortest Path to Get All Keys | LeetCode Daily Challenge
zhlédnutí 2,2KPřed rokem
leetcode.com/problems/shortest-path-to-get-all-keys/description/ 0:00 - Question Understanding 3:10 - Approach 1 (Incorrect) 6:40 - Bit Manipulation 12:40 - Approach 2 #coding #dsa #leetcode #daily #programming #cpp #tutorial
1514. Path with Maximum Probability | Dijktras | LeetCode Daily Challenge
zhlédnutí 1,4KPřed rokem
leetcode.com/problems/path-with-maximum-probability/ 0:00 - Question Understanding 2:00 - Approach 4:00 - Dry Run 10:00 - Code #coding #dsa #leetcode #daily #programming #cpp #tutorial
373. Find K Pairs with Smallest Sums | Min-Heap | LeetCode Daily Challenge
zhlédnutí 4KPřed rokem
leetcode.com/problems/find-k-pairs-with-smallest-sums/description/ 0:00 - Question Understanding 3:00 - Brute Force Approach 0 5:00 - Approach 1 14:20 - Approach 2 #coding #dsa #leetcode #daily #programming #cpp #tutorial
2462. Total Cost to Hire K Workers | Min-Heap | Two Pointers | LeetCode Daily Challenge
zhlédnutí 1,6KPřed rokem
leetcode.com/problems/total-cost-to-hire-k-workers/description/ 0:00 - Question Understanding 7:00 - Brute Force Approach 10:30 - Optimising & Dry Run 18:00 - Coding #coding #dsa #leetcode #daily #programming #cpp #tutorial
1575. Count All Possible Routes | DP | LeetCode Daily Challenge
zhlédnutí 818Před rokem
leetcode.com/problems/count-all-possible-routes/description/ 0:00 - Question Understanding 6:05 - Approach 1 14:00 - Approach 2 #coding #dsa #leetcode #daily #programming #cpp #tutorial
956. Tallest Billboard | LeetCode Daily Challenge
zhlédnutí 2,2KPřed rokem
leetcode.com/problems/tallest-billboard/ #coding #dsa #leetcode #daily #programming #cpp #tutorial
2448. Minimum Cost to Make Array Equal | Binary Search | Median | LeetCode Daily Challenge
zhlédnutí 1,4KPřed rokem
leetcode.com/problems/minimum-cost-to-make-array-equal/description/ 0:00 - Question Understanding 4:30 - Brute Force 7:00 - Observations 9:50 - Approach 2 15:10 - Approach 3 #coding #dsa #leetcode #daily #programming #cpp #tutorial
2090. K Radius Subarray Averages | Sliding Window | LeetCode Daily Challenge
zhlédnutí 1,1KPřed rokem
leetcode.com/problems/k-radius-subarray-averages/description/ 0:00 - Question Understanding 5:10 - Observations 7:50 - Approach 1 14:45 - Approach 2 #coding #dsa #leetcode #daily #programming #cpp #tutorial
2328. Number of Increasing Paths in a Grid | Recursion | LeetCode Daily Challenge
zhlédnutí 1,1KPřed rokem
2328. Number of Increasing Paths in a Grid | Recursion | LeetCode Daily Challenge
1187. Make Array Strictly Increasing | Recursion | LeetCode Daily Challenge
zhlédnutí 2,2KPřed rokem
1187. Make Array Strictly Increasing | Recursion | LeetCode Daily Challenge
1569. Number of Ways to Reorder Array to Get Same BST | Recursion | DFS | LeetCode Daily Challenge
zhlédnutí 3KPřed rokem
1569. Number of Ways to Reorder Array to Get Same BST | Recursion | DFS | LeetCode Daily Challenge
1161. Maximum Level Sum of a Binary Tree | BFS + DFS | LeetCode Daily Challenge
zhlédnutí 635Před rokem
1161. Maximum Level Sum of a Binary Tree | BFS DFS | LeetCode Daily Challenge
530. Minimum Absolute Difference in BST | Inorder Traversal | BFS | LeetCode Daily Challenge
zhlédnutí 1,9KPřed rokem
530. Minimum Absolute Difference in BST | Inorder Traversal | BFS | LeetCode Daily Challenge
2101. Detonate the Maximum Bombs | Recursion | BFS | LeetCode Daily Challenge
zhlédnutí 772Před rokem
2101. Detonate the Maximum Bombs | Recursion | BFS | LeetCode Daily Challenge
1547. Minimum Cost to Cut a Stick | DP | LeetCode Daily Challenge
zhlédnutí 918Před rokem
1547. Minimum Cost to Cut a Stick | DP | LeetCode Daily Challenge
1140. Stone Game II | DP | LeetCode Daily Challenge
zhlédnutí 4,1KPřed rokem
1140. Stone Game II | DP | LeetCode Daily Challenge
837. New 21 Game | Probability + DP | LeetCode Daily Challenge
zhlédnutí 2,4KPřed rokem
837. New 21 Game | Probability DP | LeetCode Daily Challenge
2542. Maximum Subsequence Score | LeetCode Daily Challenge
zhlédnutí 1,9KPřed rokem
2542. Maximum Subsequence Score | LeetCode Daily Challenge
347. Top K Frequent Elements | LeetCode Daily Challenge
zhlédnutí 485Před rokem
347. Top K Frequent Elements | LeetCode Daily Challenge
934. Shortest Bridge | Graphs | LeetCode Daily Challenge
zhlédnutí 1,3KPřed rokem
934. Shortest Bridge | Graphs | LeetCode Daily Challenge
399. Evaluate Division | GRAPHS | | LeetCode Daily Challenge POTD
zhlédnutí 1,4KPřed rokem
399. Evaluate Division | GRAPHS | | LeetCode Daily Challenge POTD
785. Is Graph Bipartite? | GRAPHS | | LeetCode Daily Challenge POTD
zhlédnutí 494Před rokem
785. Is Graph Bipartite? | GRAPHS | | LeetCode Daily Challenge POTD
2130. Maximum Twin Sum of a Linked List | In-Place | LeetCode Daily Challenge POTD | LinkedList
zhlédnutí 481Před rokem
2130. Maximum Twin Sum of a Linked List | In-Place | LeetCode Daily Challenge POTD | LinkedList
optimal ka matlab kuch v samjha dete ho, alluwa understanding video h
thanks bro
I am glad that I discovered your channel today. Your explanation is so much better than the leetcode editorial. Your video is very concise. I hit the "Subscribe" button.
I discovered your channel today and this is the second video I watched. Thank you for making this awesome video. I only solved it with O(n) space complexity in the past. Now I know the O(1) space complexity solution.
For those who didn't understand the intuition behind this solution. Imagine 2 supports s1 and s2. s1 starts from 0 and s2 starts from sum of array. Now each rod will have 3 choice 1. Add to S1 2. Add to S2 3. Remove from S2. Notice the third choice is removing from s2 not adding into Null Set. So comparing with the solution provided in the video. op1 is Choice 1 op2 is Choice 3 op3 is Choice 2, as rod is already added into s2 thats why no change. In recursive solution op3 is Choice of adding rod into a null set. which is different in memoized answer.
How it will pass all the test cases ?. It will give tle for sure. You are traversing some tree in every dfs call and you are saying it is o(n)?
hello 10:48 video me aapne run kiya vo kese kiya?
Nice Explanation !
I think question is fairly simple, language is also easy to understand
GIVING TLE
Sometime it cant able to solve palindrome questions
@15:59 how can the min heap have <7,2> it should be <1,9> right ? we first popped <1,2> and then inserted {i,j+1} thats <1,9> and its lesser than <7,2> someone pls make me understand
Very good explanation :)
Nice explanation
How to install axioms?
great explanatiob bro
Bro can you provide the brute force solution for this in java if possible or c++ will be fine
good explanation
Thank you! Great explanation
I didn’t find anywhere this way solution. Thank you so much
this is O(nlogn) solution but we can do this with o(n) time complexity
Thank you sir 🎉
Brilliant explanation
Hello can you create a video on how to connect the node application with
Thanks for the video , nicely explained.
I really appreciate the hard work you have put into this video. Thanks for making this video.
How to create the link for api, like he used london and generated the API key
it really helped a lot thankyou😊😊
will this work on negative numbers ?
The explanation was easy to understand, thanks
while swapping, why do we take (2*min) ?
simple and neat solution bro
The explanation was really awesome. Thanks a lot❤❤❤
volume is very low
Liked the solution. I made a small improvement with memoization. class Solution: def __init__(self): self.memo = {} def minOperations(self, n: int) -> int: if n in self.memo: return self.memo[n] v = int(math.log(n, 2)) if n == pow(2, v): return 1 low = pow(2, v) high = pow(2, v+1) d1 = n - low d2 = high - n self.memo[n] = 1 + min(self.minOperations(d1) , self.minOperations(d2)) return self.memo[n]
hy your approach is very efficient. But I did not understood the intuition of summing up ALL elements of a diagonal rather than only 2 for each corresponding element of a matrix. Like in the intuition, you explained if both (right and bottom element) sum is greater than 1, then there surely exists a path to dest even after flipping. But whats the logic with summing up ALL diagonal elements?
The apprpach 1 won't work, it depends on the order in which you remove the edge
Bhaiya can you please suggest me some platform where i can practice question asked in OA
Thank you sir, Very nice explanation!
Could you please explain why you took ans as long?
best explanation thanks ! : )
Nice explanation
What a technique! Just Awesome!
So good solution my friend
I really didn't understood anything
nice bro!!
bro, I'm so happy with this explaination
the best explaination i have ever seen
Good Explanation Bro everything connects
NIce explanation
The second if() inside check() should be a XOR not a OR.