2015年10月21日

[Leetcode]ZigZag Conversion 笨方法

摘要: class Solution {public: string convert(string s, int numRows) {... 阅读全文

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

2015年10月20日

[leetcode]Palindrome Linked List

摘要: 细节实现题,在纸上画了一会才AC /** * Definition for singly-linked list. * struct... 阅读全文

posted @ 2015-10-20 11:37 泉山绿树 阅读(19) 评论(0) 推荐(0)

2015年10月19日

求字符串的全部组合(字符串中无重复字符)

摘要: 中午吃东西时候看到这道题有个奇妙的解法挺好玩,求字符串“abcd”的全部组合。 输入:“abcd” 输出:”a”,”b”,”c”... 阅读全文

posted @ 2015-10-19 17:15 泉山绿树 阅读(51) 评论(0) 推荐(0)

2015年10月11日

[Leetcode] Count and Say

摘要: string countAndSay(int n) { string res("1"); whi... 阅读全文

posted @ 2015-10-11 19:39 泉山绿树 阅读(16) 评论(0) 推荐(0)

2015年10月8日

【Leecode】 Instersection od Two Linked Lists

摘要: /** * Definition for singly-linked list. * struct ListNode { * ... 阅读全文

posted @ 2015-10-08 18:47 泉山绿树 阅读(13) 评论(0) 推荐(0)

2015年9月30日

LeetCode:Symmetric Tree(循环版)

摘要: /** * Definition for a binary tree node. * struct TreeNode { * ... 阅读全文

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

2015年9月28日

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)

2015年9月20日

[leetcode]Move zeros 慢方法和快方法

摘要: 慢方法 class Solution {public: void moveZeroes(vector& nums) { ... 阅读全文

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

2015年9月7日

关于C++表达式求值的困惑

摘要: #include using namespace std;int main(int argc, char *argv[]){ ... 阅读全文

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

导航