摘要: Given a binary tree root. Split the binary tree into two subtrees by removing 1 edge such that the product of the sums of the subtrees are maximized. 阅读全文
posted @ 2021-03-11 21:22 coderJ_ONE 阅读(76) 评论(0) 推荐(0) 编辑
摘要: Given the root of a binary tree, each node in the tree has a distinct value. After deleting all nodes with a value in to_delete, we are left with a fo 阅读全文
posted @ 2021-03-11 21:11 coderJ_ONE 阅读(68) 评论(0) 推荐(0) 编辑
摘要: Given the root of a binary tree, each node has a value from 0 to 25 representing the letters 'a' to 'z': a value of 0 represents 'a', a value of 1 rep 阅读全文
posted @ 2021-03-11 21:06 coderJ_ONE 阅读(38) 评论(0) 推荐(0) 编辑
摘要: A tree is an undirected graph in which any two vertices are connected by exactly one path. In other words, any connected graph without simple cycles i 阅读全文
posted @ 2021-03-11 20:42 coderJ_ONE 阅读(34) 评论(0) 推荐(0) 编辑
摘要: Given the root of a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bot 阅读全文
posted @ 2021-03-11 20:16 coderJ_ONE 阅读(41) 评论(0) 推荐(0) 编辑
摘要: Given a reference of a node in a connected undirected graph. Return a deep copy (clone) of the graph. Each node in the graph contains a val (int) and 阅读全文
posted @ 2021-03-11 19:51 coderJ_ONE 阅读(30) 评论(0) 推荐(0) 编辑
摘要: You are given the root of a binary search tree (BST), where exactly two nodes of the tree were swapped by mistake. Recover the tree without changing i 阅读全文
posted @ 2021-03-11 19:42 coderJ_ONE 阅读(34) 评论(0) 推荐(0) 编辑
摘要: Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. You may return the answer in any order. Example 1: Input: n 阅读全文
posted @ 2021-03-11 19:23 coderJ_ONE 阅读(31) 评论(0) 推荐(0) 编辑
摘要: The figure shows the tree view of directories in Windows File Explorer. When a file is selected, there is a file path shown in the above navigation ba 阅读全文
posted @ 2021-03-11 18:26 coderJ_ONE 阅读(128) 评论(0) 推荐(0) 编辑
摘要: A substring is a continuous part of a string. A subsequence is the part of a string that might be continuous or not but the order of the elements is m 阅读全文
posted @ 2021-03-11 18:21 coderJ_ONE 阅读(136) 评论(0) 推荐(0) 编辑
摘要: The Fibonacci sequence F​n​​ is defined by F​n+2​​=F​n+1​​+F​n​​ for n≥0, with F​0​​=0 and F​1​​=1. The closest Fibonacci number is defined as the Fib 阅读全文
posted @ 2021-03-11 18:19 coderJ_ONE 阅读(104) 评论(0) 推荐(0) 编辑