Destructive algorithms when solving whiteboarding taskThere was a discussion in comments on Stackoverflow in Russian about detecting palindrome.Aug 14, 2021Aug 14, 2021
Avoid integer overflow when calculating factorials. Based on leetcode #62 Unique PathsUsing math for solving many programming problems is the fastest way. For example, you can solve leetcode #62 Unique Paths mathematically. A…Jul 31, 2021Jul 31, 2021
Digging around leetcode #876 Middle of the Linked ListToday when I repeated the solution for leetcode #876 Middle of the Linked List, I thought suddenly. What if we need to return the first…Jul 25, 2021Jul 25, 2021
ATM analogy for leetcode #104 Maximum Depth of Binary TreeI’ve found an ATM analogy answering what recursion is in this video.Jul 24, 2021Jul 24, 2021
Leetcode #67 and avoiding edge casesI often see a typical solution for leetcode #67 Add Binary:Jul 18, 2021Jul 18, 2021
Leetcode #0119. How create formula for O(N) solutionTwo days ago I tried to solve again leetcode problem 0119 Pascal’s triangle using the math approach. It is the fastest approach to…Jul 14, 2021Jul 14, 2021
The easiest way to traverse binary tree postorder iteratively. What’s the catch?Traverse binary tree iteratively is hard to remember, especially for postorder.Jul 9, 2021Jul 9, 2021
Why using one dictionary for leetcode #205 is a bad idea?I often see that candidates use one dictionary when solving leetcode problem #205 ‘Isomorphic Strings’.Jul 2, 2021Jul 2, 2021