上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 64 下一页
摘要: Given the root of a binary tree and an array of TreeNode objects nodes, return the lowest common ancestor (LCA) of all the nodes in nodes. All the nod 阅读全文
posted @ 2023-07-20 01:48 CNoodle 阅读(105) 评论(0) 推荐(0)
摘要: You are given two strings s and t consisting of only lowercase English letters. Return the minimum number of characters that need to be appended to th 阅读全文
posted @ 2023-07-19 22:23 CNoodle 阅读(72) 评论(0) 推荐(0)
摘要: You are given an integer array nums and an integer k. Find the maximum subarray sum of all the subarrays of nums that meet the following conditions: T 阅读全文
posted @ 2023-07-19 13:09 CNoodle 阅读(149) 评论(0) 推荐(0)
摘要: You are given a 0-indexed binary string s which represents the types of buildings along a street where: s[i] = '0' denotes that the ith building is an 阅读全文
posted @ 2023-07-19 12:30 CNoodle 阅读(67) 评论(0) 推荐(0)
摘要: A robot on an infinite XY-plane starts at point (0, 0) facing north. The robot can receive a sequence of these three possible types of commands: -2: T 阅读全文
posted @ 2023-07-19 06:55 CNoodle 阅读(61) 评论(0) 推荐(0)
摘要: You are given an array nums of positive integers and a positive integer k. A subset of nums is beautiful if it does not contain two integers with an a 阅读全文
posted @ 2023-07-19 03:59 CNoodle 阅读(313) 评论(0) 推荐(0)
摘要: You are given a 2D integer array intervals, where intervals[i] = [lefti, righti] describes the ith interval starting at lefti and ending at righti (in 阅读全文
posted @ 2023-07-18 04:11 CNoodle 阅读(101) 评论(0) 推荐(0)
摘要: Given an integer array arr and an integer difference, return the length of the longest subsequence in arr which is an arithmetic sequence such that th 阅读全文
posted @ 2023-07-15 06:54 CNoodle 阅读(60) 评论(0) 推荐(0)
摘要: You are given two 0-indexed integer arrays nums1 and nums2 of equal length n and a positive integer k. You must choose a subsequence of indices from n 阅读全文
posted @ 2023-07-13 09:43 CNoodle 阅读(300) 评论(0) 推荐(0)
摘要: Given an n x n array of integers matrix, return the minimum sum of any falling path through matrix. A falling path starts at any element in the first 阅读全文
posted @ 2023-07-13 07:59 CNoodle 阅读(45) 评论(0) 推荐(0)
摘要: A teacher is writing a test with n true/false questions, with 'T' denoting true and 'F' denoting false. He wants to confuse the students by maximizing 阅读全文
posted @ 2023-07-07 09:14 CNoodle 阅读(116) 评论(0) 推荐(0)
摘要: You are given an integer finalSum. Split it into a sum of a maximum number of unique positive even integers. For example, given finalSum = 12, the fol 阅读全文
posted @ 2023-07-06 10:04 CNoodle 阅读(55) 评论(0) 推荐(0)
摘要: There is a bag that consists of items, each item has a number 1, 0, or -1 written on it. You are given four non-negative integers numOnes, numZeros, n 阅读全文
posted @ 2023-07-06 06:57 CNoodle 阅读(29) 评论(0) 推荐(0)
摘要: You are given a 0-indexed 2D integer array nums. Initially, your score is 0. Perform the following operations until the matrix becomes empty: From eac 阅读全文
posted @ 2023-07-05 07:59 CNoodle 阅读(57) 评论(0) 推荐(0)
摘要: Given a binary array nums, you should delete one element from it. Return the size of the longest non-empty subarray containing only 1's in the resulti 阅读全文
posted @ 2023-06-29 05:04 CNoodle 阅读(190) 评论(0) 推荐(0)
摘要: For two strings s and t, we say "t divides s" if and only if s = t + ... + t (i.e., t is concatenated with itself one or more times). Given two string 阅读全文
posted @ 2023-06-27 14:44 CNoodle 阅读(149) 评论(0) 推荐(0)
摘要: Given an array of integers, return the maximum sum for a non-empty subarray (contiguous elements) with at most one element deletion. In other words, y 阅读全文
posted @ 2023-06-27 13:43 CNoodle 阅读(57) 评论(0) 推荐(0)
摘要: You are given a 0-indexed integer array costs where costs[i] is the cost of hiring the ith worker. You are also given two integers k and candidates. W 阅读全文
posted @ 2023-06-27 11:13 CNoodle 阅读(180) 评论(0) 推荐(0)
摘要: Given a positive integer n, find the pivot integer x such that: The sum of all elements between 1 and x inclusively equals the sum of all elements bet 阅读全文
posted @ 2023-06-26 23:08 CNoodle 阅读(70) 评论(0) 推荐(0)
摘要: 你有一个用于表示一片土地的整数矩阵land,该矩阵中每个点的值代表对应地点的海拔高度。若值为0则表示水域。由垂直、水平或对角连接的水域为池塘。池塘的大小是指相连接的水域的个数。编写一个方法来计算矩阵中所有池塘的大小,返回值需要从小到大排序。 示例: 输入:[ [0,2,1,0], [0,1,0,1] 阅读全文
posted @ 2023-06-22 06:38 CNoodle 阅读(56) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 64 下一页