1. 前缀,后缀和中缀之间相互转换
中缀表示转前缀/后缀(附代码)
针对负数的情况
前缀/中缀/后缀相互转换
2. Tree Traversal
wiki
successor, predecessor
Iterative Preorder Traversal
Inorder Tree Traversal without Recursion
Inorder Tree Traversal without recursion and without stack
Iterative Postorder Traversal | Set 1 (Using Two Stacks)
Iterative Postorder Traversal | Set 2 (Using One Stack)
3. Morris Tree Traversal
build threaded tree, O(1) space traversal, no recursion, no stack using.
preorder, inorder, postorder traversal: Annie Kim's Blog
4. Sum Partition
如何把一堆数字分为两堆,使它们的和相等,或者相差最小。
Partition Problem
Partition a set into two subsets such that the difference of subset sums is minimum
5. K-Sum
从一堆数里面找到 k 个数,使它们的和等于 target,有多少种方式。
三维 dynamic programming
参考程序