上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 64 下一页
摘要: The pair sum of a pair (a,b) is equal to a + b. The maximum pair sum is the largest pair sum in a list of pairs. For example, if we have pairs (1,5),  阅读全文
posted @ 2021-06-11 23:40 CNoodle 阅读(371) 评论(0) 推荐(0)
摘要: You are given an integer array nums and an integer target. You want to build an expression out of nums by adding one of the symbols '+' and '-' before 阅读全文
posted @ 2021-06-10 00:57 CNoodle 阅读(259) 评论(0) 推荐(0)
摘要: Given the roots of two binary search trees, root1 and root2, return true if and only if there is a node in the first tree and a node in the second tre 阅读全文
posted @ 2021-06-09 01:09 CNoodle 阅读(401) 评论(0) 推荐(0)
摘要: Given an array of integers arr, replace each element with its rank. The rank represents how large the element is. The rank has the following rules: Ra 阅读全文
posted @ 2021-06-08 11:29 CNoodle 阅读(242) 评论(0) 推荐(0)
摘要: Given a binary tree, return the sum of values of nodes with even-valued grandparent. (A grandparent of a node is the parent of its parent, if it exist 阅读全文
posted @ 2021-06-03 12:54 CNoodle 阅读(137) 评论(0) 推荐(0)
摘要: Given an array of integers arr, sort the array by performing a series of pancake flips. In one pancake flip we do the following steps: Choose an integ 阅读全文
posted @ 2021-06-03 00:33 CNoodle 阅读(90) 评论(0) 推荐(0)
摘要: You have some number of sticks with positive integer lengths. These lengths are given as an array sticks, where sticks[i] is the length of the ith sti 阅读全文
posted @ 2021-05-31 06:05 CNoodle 阅读(157) 评论(0) 推荐(0)
摘要: You are given the root of a binary tree. We install cameras on the tree nodes where each camera at a node can monitor its parent, itself, and its imme 阅读全文
posted @ 2021-05-31 05:04 CNoodle 阅读(105) 评论(0) 推荐(0)
摘要: Given a list of strings words and a string pattern, return a list of words[i] that match pattern. You may return the answer in any order. A word match 阅读全文
posted @ 2021-05-23 02:07 CNoodle 阅读(123) 评论(0) 推荐(0)
摘要: You are given an array of words where each word consists of lowercase English letters. wordA is a predecessor of wordB if and only if we can insert ex 阅读全文
posted @ 2021-05-23 00:57 CNoodle 阅读(255) 评论(0) 推荐(0)
摘要: Suppose we have a file system that stores both files and directories. An example of one system is represented in the following picture: Here, we have  阅读全文
posted @ 2021-05-22 15:27 CNoodle 阅读(273) 评论(0) 推荐(0)
摘要: You are given a license key represented as a string s that consists of only alphanumeric characters and dashes. The string is separated into n + 1 gro 阅读全文
posted @ 2021-05-22 00:20 CNoodle 阅读(142) 评论(0) 推荐(0)
摘要: We are given a binary tree (with root node root), a target node, and an integer value k. Return a list of the values of all nodes that have a distance 阅读全文
posted @ 2021-05-18 23:42 CNoodle 阅读(137) 评论(0) 推荐(0)
摘要: There are n cities numbered from 0 to n-1 and n-1 roads such that there is only one way to travel between two different cities (this network form a tr 阅读全文
posted @ 2021-05-18 00:46 CNoodle 阅读(578) 评论(0) 推荐(0)
摘要: Given the head of a linked list, we repeatedly delete consecutive sequences of nodes that sum to 0 until there are no such sequences. After doing so, 阅读全文
posted @ 2021-05-17 05:01 CNoodle 阅读(90) 评论(0) 推荐(0)
摘要: Given the head of a linked list and two integers m and n. Traverse the linked list and remove some nodes in the following way: Start with the head as 阅读全文
posted @ 2021-05-15 12:56 CNoodle 阅读(627) 评论(0) 推荐(0)
摘要: Given the head of a linked list, find all the values that appear more than once in the list and delete the nodes that have any of those values. Return 阅读全文
posted @ 2021-05-14 23:43 CNoodle 阅读(670) 评论(0) 推荐(0)
摘要: You are given an integer array heights representing the heights of buildings, some bricks, and some ladders. You start your journey from building 0 an 阅读全文
posted @ 2021-05-13 06:04 CNoodle 阅读(536) 评论(0) 推荐(0)
摘要: Consider all the leaves of a binary tree, from left to right order, the values of those leaves form a leaf value sequence. For example, in the given t 阅读全文
posted @ 2021-05-10 02:31 CNoodle 阅读(80) 评论(0) 推荐(0)
摘要: There is a hidden integer array arr that consists of n non-negative integers. It was encoded into another integer array encoded of length n - 1, such 阅读全文
posted @ 2021-05-06 14:23 CNoodle 阅读(252) 评论(0) 推荐(0)
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 64 下一页