摘要: http://oj.leetcode.com/problems/binary-tree-preorder-traversal/!看题上来就递归 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * TreeNode(int x) : val(x), left(NULL), right(NULL) {} 8 * }; 9 */10 class Solution {11 p... 阅读全文
posted @ 2013-11-15 15:21 沙茶面 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 斐波那契数列:http://zh.wikipedia.org/wiki/%E6%96%90%E6%B3%A2%E9%82%A3%E5%A5%91%E6%95%B0%E5%88%97卡塔兰数:http://en.wikipedia.org/wiki/Catalan_number完美数:http://zh.wikipedia.org/wiki/%E5%AE%8C%E7%BE%8E%E6%95%B0 阅读全文
posted @ 2013-11-15 13:49 沙茶面 阅读(133) 评论(0) 推荐(0) 编辑