
leetcode
nicklaus_zhou
目前是一名苦逼在校生,struggling and struggling 。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
24.两两交换链表结点
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */class Solution {public: ListNode* s...原创 2019-05-08 20:34:29 · 153 阅读 · 0 评论 -
38.报数
#include "iostream"#include "string"string countAndSay(int n){ if (1 == n) return "1"; else { string last_str = countAndSay(n - 1); char num = '1'; ch...原创 2019-04-30 20:35:43 · 112 阅读 · 0 评论 -
61.旋转链表
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */class Solution {public: ListNode* r...原创 2019-05-08 22:15:38 · 156 阅读 · 0 评论 -
104. 二叉树的最大深度
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */#de...原创 2019-05-13 21:33:53 · 145 阅读 · 0 评论 -
23.合并K个排序链表
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */class Solution {public: ListNode* m...原创 2019-05-06 21:18:13 · 97 阅读 · 0 评论 -
82. 删除排序链表中的重复元素 II
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */class Solution {public: ListNode* d...原创 2019-05-09 19:49:52 · 146 阅读 · 0 评论 -
83. 删除排序链表中的重复元素
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */class Solution {public: ListNode* d...原创 2019-05-10 10:26:50 · 167 阅读 · 0 评论 -
876. 链表的中间结点
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */class Solution {public: ListNode* m...原创 2019-05-11 10:27:59 · 170 阅读 · 0 评论