Andrei KruglovDestructive algorithms when solving whiteboarding taskThere was a discussion in comments on Stackoverflow in Russian about detecting palindrome.2 min read·Aug 14, 2021----
Andrei KruglovAvoid 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…2 min read·Jul 31, 2021----
Andrei KruglovDigging 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…4 min read·Jul 25, 2021----
Andrei KruglovATM analogy for leetcode #104 Maximum Depth of Binary TreeI’ve found an ATM analogy answering what recursion is in this video.1 min read·Jul 24, 2021----
Andrei KruglovLeetcode #67 and avoiding edge casesI often see a typical solution for leetcode #67 Add Binary:3 min read·Jul 18, 2021----
Andrei KruglovLeetcode #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…3 min read·Jul 14, 2021----
Andrei KruglovThe easiest way to traverse binary tree postorder iteratively. What’s the catch?Traverse binary tree iteratively is hard to remember, especially for postorder.2 min read·Jul 9, 2021----
Andrei KruglovWhy 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’.2 min read·Jul 2, 2021----