Skip to content

Instantly share code, notes, and snippets.

@liancheng
Created June 6, 2013 09:47
Show Gist options
  • Save liancheng/5720458 to your computer and use it in GitHub Desktop.
Save liancheng/5720458 to your computer and use it in GitHub Desktop.
2013/06/10手写代码竞赛参考实现
Decode Ways
https://github.com/liancheng/leetcode/blob/master/solutions/decode-ways/dp.hpp
Partition List
https://github.com/liancheng/leetcode/blob/master/solutions/partition-list/solution.hpp
Flatten Binary Tree to Linked List
https://github.com/liancheng/leetcode/blob/master/solutions/flatten-binary-tree-to-linked-list/solution.hpp
Binary Tree Inorder Traversal
采用Morris Traversal,可实现O(1)空间复杂度迭代中序遍历
https://github.com/liancheng/leetcode/blob/master/solutions/binary-tree-inorder-traversal/solution.hpp
Longest Valid Parentheses
DP解法(无法通过large judge): https://github.com/liancheng/leetcode/blob/master/solutions/longest-valid-parentheses/dp.hpp
线性解法: https://github.com/liancheng/leetcode/blob/master/solutions/longest-valid-parentheses/linear.hpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment