Articles in this series
(Hard but Medium) · Solution Traverse freely. There's no way you could know how much the tree will stretch to left or right in advance. While you...
Solutions For each grid (i, j), do BFS twice for both Pacific and Atlantic flow: O(n^4) For each grid (i, j), do BFS twice, but this time, can stop...
Rotting Oranges (Medium) · While the problem 542(01 Matrix) can be solved by DP, this problem can't be. The rotting can only be propagated by attached...
3 Easy, 2 Medium · 567. Permutation in String (Medium) Algorithm count each occurrence in s1. while i := sliding window along s2: increment count[s2[i -...
1 Medium · Today I solved.. Daily challenge 220819 659 Split Array into Consecutive Subsequences Algorithm convert non-decreasing order into...
3 Easy, 1 Medium · Today I solved.. LeetCode 75 - Level 1 Day 4. Linked List 876 Middle of the Linked List (Easy) 142 Linked List Cycle II...