Given a binary tree for the last text challenge in 2021, return its sequential traversal. First introduce the traversal rules of binary trees: binary trees...
This is 686 on LeetCode. Repeat string matching with medium difficulty. Tag: "string hash", "KMP" Given two strings A and B, find the minimum number...
Day ninety: power button 830, the location of the larger group address: https://leetcode-cn.com/problems/positions-of-large-groups/ : double pointer, a traverse; But pay attention to 'a '
Some time ago, my good friend Helen Lovass interviewed for the job of Senior Android development engineer. By byte convention, the stroking algorithm won't get...
Binary tree serialization and deserialization, I use BFS (breadth-first traversal) method to do. In fact, friends also use BFS for job interviews. As you can...
Mid-order traversal to determine whether the current node is greater than the previous node in mid-order traversal. If so, BST is satisfied and the traversal...
This is schedule 630 on LeetCode III. The difficulty is difficult. There are $N $different online courses, numbered from $1$to $n$. Give you an array...
This is 1610 on LeetCode. The maximum number of visible points is difficult. Tag: "math", "geometry", "sort", "double pointer", "sliding window" give you a set...
In the previous several articles, I summarized the solutions of the recursive and iterative ways of the pre-order traversal, middle-order traversal and post-order traversal of...