上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 26 下一页
摘要: 原题链接在这里:https://leetcode.com/problems/shortest-path-with-alternating-colors/ 题目: Consider a directed graph, with nodes labelled 0, 1, ..., n-1. In thi 阅读全文
posted @ 2019-08-09 11:51 Dylan_Java_NYC 阅读(884) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/is-graph-bipartite/ 题目: Given an undirected graph, return true if and only if it is bipartite. Recall that a gra 阅读全文
posted @ 2019-08-08 00:51 Dylan_Java_NYC 阅读(509) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/find-eventual-safe-states/ 题目: In a directed graph, we start at some node and every turn, walk along a directed 阅读全文
posted @ 2019-08-06 07:42 Dylan_Java_NYC 阅读(336) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/partition-array-for-maximum-sum/ 题目: Given an integer array A, you partition the array into (contiguous) subarra 阅读全文
posted @ 2019-08-05 03:45 Dylan_Java_NYC 阅读(799) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/keys-and-rooms/ 题目: There are N rooms and you start in room 0. Each room has a distinct number in 0, 1, 2, ..., 阅读全文
posted @ 2019-08-04 08:47 Dylan_Java_NYC 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/lexicographically-smallest-equivalent-string/ 题目: Given strings A and B of the same length, we say A[i] and B[i] 阅读全文
posted @ 2019-08-04 08:08 Dylan_Java_NYC 阅读(1135) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/path-with-maximum-minimum-value/ 题目: Given a matrix of integers A with R rows and C columns, find the maximum sc 阅读全文
posted @ 2019-08-04 07:13 Dylan_Java_NYC 阅读(3983) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/connecting-cities-with-minimum-cost/ 题目: There are N cities numbered from 1 to N. You are given connections, whe 阅读全文
posted @ 2019-08-01 09:41 Dylan_Java_NYC 阅读(3618) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/the-earliest-moment-when-everyone-become-friends/ 题目: In a social group, there are N people, with unique integer 阅读全文
posted @ 2019-08-01 08:43 Dylan_Java_NYC 阅读(898) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/redundant-connection-ii/ 题目: In this problem, a rooted tree is a directed graph such that, there is exactly one 阅读全文
posted @ 2019-07-24 12:07 Dylan_Java_NYC 阅读(354) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/redundant-connection/ 题目: In this problem, a tree is an undirected graph that is connected and has no cycles. Th 阅读全文
posted @ 2019-07-24 11:08 Dylan_Java_NYC 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/satisfiability-of-equality-equations/ 题目: Given an array equations of strings that represent relationships betwe 阅读全文
posted @ 2019-07-23 11:07 Dylan_Java_NYC 阅读(335) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/regions-cut-by-slashes/ 题目: In a N x N grid composed of 1 x 1 squares, each 1 x 1 square consists of a /, \, or 阅读全文
posted @ 2019-07-23 10:42 Dylan_Java_NYC 阅读(370) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/most-stones-removed-with-same-row-or-column/ 题目: On a 2D plane, we place stones at some integer coordinate point 阅读全文
posted @ 2019-07-23 09:37 Dylan_Java_NYC 阅读(446) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/accounts-merge/ 题目: Given a list accounts, each element accounts[i] is a list of strings, where the first elemen 阅读全文
posted @ 2019-07-19 12:09 Dylan_Java_NYC 阅读(715) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/network-delay-time/ 题目: There are N network nodes, labelled 1 to N. Given times, a list of travel times as direc 阅读全文
posted @ 2019-07-10 10:37 Dylan_Java_NYC 阅读(359) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/smallest-subtree-with-all-the-deepest-nodes/ 题目: Given a binary tree rooted at root, the depth of each node is t 阅读全文
posted @ 2019-07-08 13:06 Dylan_Java_NYC 阅读(394) 评论(0) 推荐(1) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/complete-binary-tree-inserter/ 题目: A complete binary tree is a binary tree in which every level, except possibly 阅读全文
posted @ 2019-07-07 09:24 Dylan_Java_NYC 阅读(405) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/split-bst/ 题目: Given a Binary Search Tree (BST) with root node root, and a target value V, split the tree into t 阅读全文
posted @ 2019-07-07 07:48 Dylan_Java_NYC 阅读(453) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/check-completeness-of-a-binary-tree/ 题目: Given a binary tree, determine if it is a complete binary tree. Definit 阅读全文
posted @ 2019-07-07 07:22 Dylan_Java_NYC 阅读(887) 评论(1) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/maximum-difference-between-node-and-ancestor/ 题目: Given the root of a binary tree, find the maximum value V for 阅读全文
posted @ 2019-07-07 02:07 Dylan_Java_NYC 阅读(905) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree/ 题目: We are given a binary tree (with root node root), a target node, and an 阅读全文
posted @ 2019-07-02 12:41 Dylan_Java_NYC 阅读(368) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/construct-binary-search-tree-from-preorder-traversal/ 题目: Return the root node of a binary search tree that matc 阅读全文
posted @ 2019-07-02 11:10 Dylan_Java_NYC 阅读(1416) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/flip-binary-tree-to-match-preorder-traversal/ 题目: Given a binary tree with N nodes, each node has a different va 阅读全文
posted @ 2019-07-02 01:00 Dylan_Java_NYC 阅读(533) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里: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 阅读全文
posted @ 2019-06-28 01:14 Dylan_Java_NYC 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里: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 阅读全文
posted @ 2019-06-27 12:21 Dylan_Java_NYC 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里: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 阅读全文
posted @ 2019-06-27 11:01 Dylan_Java_NYC 阅读(425) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里: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 阅读全文
posted @ 2019-06-26 12:56 Dylan_Java_NYC 阅读(591) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/binary-tree-pruning/ 题目: We are given the head node root of a binary tree, where additionally every node's value 阅读全文
posted @ 2019-06-26 12:44 Dylan_Java_NYC 阅读(279) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/flip-equivalent-binary-trees/ 题目: For a binary tree T, we can define a flip operation as follows: choose any nod 阅读全文
posted @ 2019-06-23 14:29 Dylan_Java_NYC 阅读(683) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/convert-binary-search-tree-to-sorted-doubly-linked-list/ 题目: Convert a BST to a sorted circular doubly-linked li 阅读全文
posted @ 2019-06-21 12:15 Dylan_Java_NYC 阅读(1066) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/construct-binary-tree-from-preorder-and-postorder-traversal/ 题目: Return any binary tree that matches the given p 阅读全文
posted @ 2019-06-21 10:19 Dylan_Java_NYC 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/longest-univalue-path/ 题目: Given a binary tree, find the length of the longest path where each node in the path 阅读全文
posted @ 2019-06-21 08:34 Dylan_Java_NYC 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/serialize-and-deserialize-n-ary-tree/ 题目: Serialization is the process of converting a data structure or object 阅读全文
posted @ 2019-06-20 00:57 Dylan_Java_NYC 阅读(859) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/find-duplicate-subtrees/ 题目: Given a binary tree, return all duplicate subtrees. For each kind of duplicate subt 阅读全文
posted @ 2019-06-19 10:39 Dylan_Java_NYC 阅读(370) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里: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 阅读全文
posted @ 2019-06-13 12:57 Dylan_Java_NYC 阅读(498) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里: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 阅读全文
posted @ 2019-06-13 11:42 Dylan_Java_NYC 阅读(775) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里: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, 阅读全文
posted @ 2019-06-12 12:37 Dylan_Java_NYC 阅读(853) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里: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 阅读全文
posted @ 2019-06-12 00:13 Dylan_Java_NYC 阅读(427) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里: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 阅读全文
posted @ 2019-06-06 00:46 Dylan_Java_NYC 阅读(367) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 26 下一页