![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
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 · 129 阅读 · 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 · 83 阅读 · 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 · 119 阅读 · 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 · 117 阅读 · 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 · 73 阅读 · 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 · 105 阅读 · 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 · 119 阅读 · 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 · 122 阅读 · 0 评论