Leetcode刷题记
随便xie写
这个作者很懒,什么都没留下…
展开
-
101. Symmetric Tree
问题描述:Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree [1,2,2,3,4,4,3] is symmetric: 1 / \ 2 2 / \ / \3 4 4 3Bu...翻译 2018-06-12 23:00:42 · 113 阅读 · 0 评论 -
104. Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.Note: A leaf is a node with no children.Ex...翻译 2018-06-13 10:59:05 · 106 阅读 · 0 评论 -
669. Trim a Binary Search Tree
Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that all its elements lies in [L, R] (R >= L). You might need to change the root of the tree, so the re...原创 2018-06-14 21:22:56 · 101 阅读 · 0 评论 -
206. Reverse Linked List
Reverse a singly linked list.Example:Input: 1->2->3->4->5->NULLOutput: 5->4->3->2->1->NULL/*思路来源:点击打开链接 *//*迭代*/class Solution {public: ListNode* reverseList(ListN...翻译 2018-06-17 13:30:38 · 151 阅读 · 0 评论