摘要:
You are given a string s that contains some bracket pairs, with each pair containing a non-empty key. For example, in the string "(name)is(age)yearsol 阅读全文
摘要:
The variance of a string is defined as the largest difference between the number of occurrences of any 2 characters present in the string. Note the tw 阅读全文
摘要:
Given an array of points where points[i] = [xi, yi] represents a point on the X-Y plane, return the maximum number of points that lie on the same stra 阅读全文
摘要:
You are given a 0-indexed integer array nums representing the contents of a pile, where nums[0] is the topmost element of the pile. In one move, you c 阅读全文
摘要:
It is a sweltering summer day, and a boy wants to buy some ice cream bars. At the store, there are n ice cream bars. You are given an array costs of l 阅读全文
摘要:
You are given a 0-indexed array nums consisting of positive integers, representing targets on a number line. You are also given an integer space. You 阅读全文
摘要:
You are given a 0-indexed integer array tasks, where tasks[i] represents the difficulty level of a task. In each round, you can complete either 2 or 3 阅读全文
摘要:
You are given an array of positive integers price where price[i] denotes the price of the ith candy and a positive integer k. The store sells baskets 阅读全文
摘要:
A sentence is a list of tokens separated by a single space with no leading or trailing spaces. Every token is either a positive number consisting of d 阅读全文
摘要:
Given a string s, return the number of homogenous substrings of s. Since the answer may be too large, return it modulo 109 + 7. A string is homogenous 阅读全文
摘要:
You are given an integer array nums of length n, and an integer array queries of length m. Return an array answer of length m where answer[i] is the m 阅读全文
摘要:
You have two types of tiles: a 2 x 1 domino shape and a tromino shape. You may rotate these shapes. Given an integer n, return the number of ways to t 阅读全文
摘要:
You are given two strings word1 and word2. You want to construct a string merge in the following way: while either word1 or word2 are non-empty, choos 阅读全文
摘要:
You are playing a solitaire game with three piles of stones of sizes a, b, and c respectively. Each turn you choose two different no 阅读全文
摘要:
You are given an integer array nums where the ith bag contains nums[i] balls. You are also given an integer maxOperations. You can perform the followi 阅读全文
摘要:
There is a bi-directional graph with n vertices, where each vertex is labeled from 0 to n - 1 (inclusive). The edges in the graph are represented as a 阅读全文
摘要:
You are given an integer array nums and two integers limit and goal. The array nums has an interesting property that abs(nums[i]) <= limit. Return the 阅读全文
摘要:
There is a binary tree rooted at 0 consisting of n nodes. The nodes are labeled from 0 to n - 1. You are given a 0-indexed integer array parents repre 阅读全文
摘要:
Given an integer n, return true if it is possible to represent n as the sum of distinct powers of three. Otherwise, return false. An integer y is a po 阅读全文
摘要:
You are given two arrays of integers nums1 and nums2, possibly of different lengths. The values in the arrays are between 1 and 6, inclusive. In one o 阅读全文