摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文