09 2015 档案

LeetCode:Symmetric Tree(循环版)
摘要:/** * Definition for a binary tree node. * struct TreeNode { * ... 阅读全文

posted @ 2015-09-30 12:27 泉山绿树 阅读(35) 评论(0) 推荐(0)

Leetcode: Balanced Binary Tree
摘要:class Solution {public: bool isBalanced(TreeNode* root) { ... 阅读全文

posted @ 2015-09-28 20:38 泉山绿树 阅读(10) 评论(0) 推荐(0)

Leetcode:String to Integer(atoi)
摘要:这道应该是最经典的一道题了吧 class Solution {public: int myAtoi(string str) {... 阅读全文

posted @ 2015-09-28 19:39 泉山绿树 阅读(17) 评论(0) 推荐(0)

[leetcode]Move zeros 慢方法和快方法
摘要:慢方法 class Solution {public: void moveZeroes(vector& nums) { ... 阅读全文

posted @ 2015-09-20 14:09 泉山绿树 阅读(16) 评论(0) 推荐(0)

关于C++表达式求值的困惑
摘要:#include using namespace std;int main(int argc, char *argv[]){ ... 阅读全文

posted @ 2015-09-07 23:05 泉山绿树 阅读(17) 评论(0) 推荐(0)

求N位格雷码(递归版and循环版and位运算版)
摘要:#include #include using namespace std;vector func(size_t n){ vecto... 阅读全文

posted @ 2015-09-06 20:55 泉山绿树 阅读(25) 评论(0) 推荐(0)

期望时间为线性时间的选择算法(C++)
摘要:#include using namespace std;void exchange(int& x, int& y){ int... 阅读全文

posted @ 2015-09-01 19:31 泉山绿树 阅读(34) 评论(0) 推荐(0)

导航