53. Maximum Subarray
12:20
Күн бұрын
179. Largest Number
15:39
Күн бұрын
476. Number Complement
9:04
Ай бұрын
624. Maximum Distance in Arrays
15:22
624. Maximum Distance in Arrays
24:24
1395. Count Number of Teams
14:32
912. Sort an Array
6:38
2 ай бұрын
2191. Sort the Jumbled Numbers
10:50
2418. Sort the People
13:43
2 ай бұрын
350. Intersection of Two Arrays II
11:23
1791. Find Center of Star Graph
11:24
1052. Grumpy Bookstore Owner
10:52
75. Sort Colors
18:20
3 ай бұрын
1002. Find Common Characters
6:12
Пікірлер
@user-zr3eu2oo7s
@user-zr3eu2oo7s 5 ай бұрын
Sir please compile all coding problems in one playlist
@bablobko
@bablobko 4 ай бұрын
Sure would do that. Definitely everybody would be getting more benefitted once that is done. Thanks for the suggestion. Please feel free to add more.
@gouravojha1353
@gouravojha1353 Жыл бұрын
Nice explanation. Today only i solved this question
@bablobko
@bablobko Жыл бұрын
Thanks, let me know if you have any doubts, post it in comments, and I will try to answer them.
@Mmmoijj
@Mmmoijj Жыл бұрын
السلام عليكم ورحمة الله وبركاته.. شكرا على المجهود الرائع الذي تبذله في هذه القناة.. اردت أن اسأل: هل من الممكن أن نستخدم البحث الثنائي للبحث عن عدد الذي عند قسمة عدد آخر معلوم عليه يكون باقي القسمه يساوي صفر؟ و ماهو معيار الانتقال بين الاعداد التي نختارها لذلك؟ ارجو الرد رجاءا.. شكرا جزيلا.
@bablobko
@bablobko Жыл бұрын
If the underlying data is sorted and divisibility is also a strictly increasing or decreasing property then only we can do it. Otherwise no!! Rather use Linear Search. Sorry for late reply.
@Mmmoijj
@Mmmoijj Жыл бұрын
شكرا جزيلا.@@bablobko
@bablobko
@bablobko Жыл бұрын
We can have even more concise code here. class Solution { public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNode q) { if(root == null || p == root || q == root) return root; TreeNode node1 = lowestCommonAncestor(root.left, p, q); TreeNode node2 = lowestCommonAncestor(root.right, p, q); if(node1 != null && node2 != null) return root; if(node2 != null) return node2; return node1; } }
@bablobko
@bablobko Жыл бұрын
2244. Minimum Rounds to Complete All Tasks, in this we are going to collect all the tasks of the same difficulty and count their frequency, map is the perfect datastructure for that. After this we know that any tasks whose count freq is greater than 3 it can be either done in values/3 + 1 days or values/3 days, as something which has remainder 2 it can be done in 3k + 2 days, or if it has remainder as 2 with values/3, then if values/3 == k, we can do the same thing as 3*(k-1) + 2 + 2, which again is k+1.