Yosgi
Yosgi
Avatar
😀
3d ai agents ai engineering ai systems algorithms algorithms array binary search tree binary tree css design pattern digital twin digital twins engineering frontend investing investing javascript javascript leetcode life linked list mcp mongodb network node.js performance optimization product engineering projects queue react sorting stack string vue web development web performance
  • Time: 60 minutes The idea is still very simple. First use DFS to add a parent to each node, and find the required target by the way. Then starting from the target, use DFS to find a point K away from …
    Algorithms Created Sat, 13 Mar 2021 00:00:00 +1300
  • Time: 10 minutes Just use the increasing property of in-order traversal of the binary search tree In-order traversal to find the left child Does pre exist? If not, assign , find the right child, and …
    Algorithms Created Sat, 13 Mar 2021 00:00:00 +1300
  • Time: 60 minutes The idea is still in-order traversal, using pre to cache the previous node. Because the in-order traversal is incremental, you must find the larger one first and then the smaller one. …
    Algorithms Created Sat, 13 Mar 2021 00:00:00 +1300
  • Time: 30 minutes The question is divided into two parts to be solved, search and delete The search part is to find the node. You can find the required node according to the properties of the binary …
    Algorithms Created Thu, 11 Mar 2021 00:00:00 +1300
  • #669. Pruning a binary search tree Release Date: March 11, 2021 Time: 20 minutes Similar to the previous question, most of them are divided into situations where the parent node is in the interval and …
    Algorithms Created Thu, 11 Mar 2021 00:00:00 +1300
  • Time: Not done The main reason I didn’t make it was that I kept thinking about how to use a stack. When I looked at the answer to the stack later, I found that recursion was the simplest. recursion …
    Algorithms Created Wed, 10 Mar 2021 00:00:00 +1300
  • Time: 25 minutes The main idea is to use the stack. The difference from the ordinary level-order traversal is that the stack is cleared every time var connect = function(root) { if (!root) return null …
    Algorithms Created Wed, 10 Mar 2021 00:00:00 +1300
  • Time: I copied the answers and finished it. It is easy to see that the idea is to use recursion, but the coding is the real problem. What we need to return is the root node, but the recursion is from …
    Algorithms Created Sun, 07 Mar 2021 00:00:00 +1300
  • Time: 30 minutes Serialization is simple and can be solved using BFS Deserialization requires the use of the properties of a binary tree, that is, the child nodes of the i-th node are (i + 1) * 2 - 1 …
    Algorithms Created Thu, 04 Mar 2021 00:00:00 +1300
  • Time: 25 minutes In fact, this is a relatively common DFS type question. The reason why it took so long is because there was a problem in judging the boundary value. When starting from the root, since …
    Algorithms Created Mon, 01 Mar 2021 00:00:00 +1300