摘要: 543. Diameter of Binary Tree(二叉树的直径) 链接 https://leetcode cn.com/problems/diameter of binary tree 题目 给定一棵二叉树,你需要计算它的直径长度。一棵二叉树的直径长度是任意两个结点路径长度中的最大值。这条路 阅读全文
posted @ 2020-03-18 14:17 cheng102e 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 234. Palindrome Linked List(回文链表) 链接 https://leetcode cn.com/problems/palindrome linked list 题目 请判断一个链表是否为回文链表。 示例 1: 输入: 1 2 输出: false 示例 2: 输入: 1 2 阅读全文
posted @ 2020-03-18 13:51 cheng102e 阅读(81) 评论(0) 推荐(0) 编辑
摘要: LeetCode 206. Reverse Linked List (反转链表) 题目 链接 https://leetcode-cn.com/problems/reverse-linked-list/ 问题描述 反转一个单链表。 示例 输入: 1->2->3->4->5->NULL 输出: 5->4 阅读全文
posted @ 2020-03-18 11:15 cheng102e 阅读(84) 评论(0) 推荐(0) 编辑