06 2019 档案
摘要:原题链接在这里:https://leetcode.com/problems/add-one-row-to-tree/ 题目: Given the root of a binary tree, then value v and depth d, you need to add a row of nod
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/all-possible-full-binary-trees/ 题目: A full binary tree is a binary tree where each node has exactly 0 or 2 child
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/smallest-string-starting-from-leaf/ 题目: Given the root of a binary tree, each node has a value from 0 to 25 repr
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/distribute-coins-in-binary-tree/ 题目: Given the root of a binary tree with N nodes, each node in the tree has nod
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/binary-tree-pruning/ 题目: We are given the head node root of a binary tree, where additionally every node's value
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/flip-equivalent-binary-trees/ 题目: For a binary tree T, we can define a flip operation as follows: choose any nod
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/convert-binary-search-tree-to-sorted-doubly-linked-list/ 题目: Convert a BST to a sorted circular doubly-linked li
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/construct-binary-tree-from-preorder-and-postorder-traversal/ 题目: Return any binary tree that matches the given p
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/longest-univalue-path/ 题目: Given a binary tree, find the length of the longest path where each node in the path
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/serialize-and-deserialize-n-ary-tree/ 题目: Serialization is the process of converting a data structure or object
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/find-duplicate-subtrees/ 题目: Given a binary tree, return all duplicate subtrees. For each kind of duplicate subt
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/insert-into-a-binary-search-tree/ 题目: Given the root node of a binary search tree (BST) and a value to be insert
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/inorder-successor-in-bst-ii/ 题目: Given a binary search tree and a node in it, find the in-order successor of tha
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/closest-leaf-in-a-binary-tree/ 题目: Given a binary tree where every node has a unique value, and a target key k,
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/equal-tree-partition/ 题目: Given a binary tree with n nodes, your task is to check if it's possible to partition
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/maximum-width-of-binary-tree/ 题目: Given a binary tree, write a function to get the maximum width of the given tr
阅读全文
摘要:Java LinkedList add 是加在list尾部. LinkedList push 施加在list头部. 等同于addFirst.
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/linked-list-components/ 题目: We are given head, the head node of a linked list containing unique integer values.
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/next-greater-node-in-linked-list/ 题目: We are given a linked list with head as the first node. Let's number the n
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/split-linked-list-in-parts/submissions/ 题目: Given a (singly) linked list with head node root, write a function t
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/design-linked-list/ 题目: Design your implementation of the linked list. You can choose to use the singly linked l
阅读全文
摘要:原题链接在这里:https://leetcode.com/problems/middle-of-the-linked-list/ 题目: Given a non-empty, singly linked list with head node head, return a middle node o
阅读全文