中文
Overview
Posts
98
About
Yosgi
😀
Yosgi
Siqi Liu
A developer who likes to tinker.
Auckland
hiyosgi@gmail.com
RSS Feed
https://www.linkedin.com/in/yosgi/
Nice Resume
A convenient and quick resume builder tool
Our Little Shire
A small 3D village to explore, with stories, animals, and little discoveries
Evo! Partner Expedition
A roguelike creature adventure about building a team, evolving partners, and battling together
Werewolf AI
A Werewolf social-deduction game played with AI players, built on discussion, voting, and hidden roles
Overview
Posts
98
About
49
results for
Algorithms
Clear filter
450-Delete a node in a binary search tree
Deleting a node from a binary search tree by locating it via the BST property, then handling the three deletion cases.
Algorithms
Created
Thu, 11 Mar 2021 00:00:00 +1300
669-Pruning a Binary Search Tree
Trimming a BST to a value range by recursing into the correct branch using the BST bounds.
Algorithms
Created
Thu, 11 Mar 2021 00:00:00 +1300
1008-Pre-order traversal to construct a binary search tree
Constructing a binary search tree from its pre-order sequence by recursively inserting each value.
Algorithms
Created
Wed, 10 Mar 2021 00:00:00 +1300
116-Fill in the next right node pointer of each node
Connecting each node to its right neighbor per level, reusing the previous layer's links to reach constant space.
Algorithms
Created
Wed, 10 Mar 2021 00:00:00 +1300
894-All possible full binary trees
Generating all possible full binary trees with recursion that combines left and right subtree counts (DP).
Algorithms
Created
Sun, 07 Mar 2021 00:00:00 +1300
297-Serialization and Deserialization of Binary Trees
Serializing a binary tree with BFS and deserializing it using parent/child index relationships.
Algorithms
Created
Thu, 04 Mar 2021 00:00:00 +1300
1372-Longest Alternating Path in a Binary Tree
Finding the longest zigzag path in a binary tree with DFS that tracks direction and length, handling the boundary cases.
Algorithms
Created
Mon, 01 Mar 2021 00:00:00 +1300
102 - Level-order Traversal of a Binary Tree
Techniques and examples for breadth-first (level-order) traversal of binary trees.
Algorithms
Created
Sun, 28 Feb 2021 00:00:00 +1300
133-Path Sum II
Collecting all root-to-leaf paths with a given sum using DFS with backtracking.
Algorithms
Created
Sun, 28 Feb 2021 00:00:00 +1300
Summary of Binary Trees
Notes on binary tree traversal — why DFS uses a stack and BFS a queue, with reusable pre/in/post-order and level-order templates.
Algorithms
Created
Sun, 28 Feb 2021 00:00:00 +1300
Previous
Next