摘要:
Given a binary tree, find the length of the longest path where each node in the path has the same value. This path may or may not pass through the roo 阅读全文
阅读排行榜
[LeetCode] 148. Sort List_Middle tag: Linked List
2019-05-02 11:11 by Johnson_强生仔仔, 217 阅读, 收藏,
摘要:
Sort a linked list in O(n log n) time using constant space complexity. Example 1: Input: 4->2->1->3 Output: 1->2->3->4 Example 2: Input: -1->5->3->4-> 阅读全文
[LeetCode] 206. Reverse Linked List_Easy tag: Linked List
2019-04-30 03:14 by Johnson_强生仔仔, 217 阅读, 收藏,
摘要:
Reverse a singly linked list. Example: Follow up: A linked list can be reversed either iteratively or recursively. Could you implement both? 很基本的一道换顺序 阅读全文
[LeetCode] 680. Valid Palindrome II_Easy tag: Two Pointers
2018-08-15 00:24 by Johnson_强生仔仔, 217 阅读, 收藏,
摘要:
Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. Example 1: Example 2: Note: 题目思路就是正常的用tw 阅读全文
[LeetCode] 367. Valid Perfect Square_Easy tag:Math
2018-08-21 13:32 by Johnson_强生仔仔, 216 阅读, 收藏,
摘要:
Given a positive integer num, write a function which returns True if num is a perfect square else False. Note: Do not use any built-in library functio 阅读全文
浙公网安备 33010602011771号