題目
Given an array of stringsarr. Stringsis a concatenation of a sub-sequence ofarrwhich haveunique characters.
Returnthe maximum possible lengthofs.
Example 1:
Input: arr = [
題目
You are given an array of stringswordsand a stringchars.
A string isgoodifit can be formed bycharacters fromchars(each charactercan only be used once).
Return the sum of lengths o
題目
We sampled integers between0and255, and stored the results in an arraycount:count[k]is the number of integers we sampled equal tok.
Return the minimum, maximum, mean, median, and mod
題目
On aninfinitenumber line, the position of the i-th stone is given bystones[i]. Call a stone anendpoint stoneif it has the smallest or largest position.
Each turn, you pick up an endp
題目
We are given a matrix withRrows andCcolumns has cells with integer coordinates(r, c), where0 = r Rand0 = c C.
Additionally, we are given a cell in that matrix with coordinates(r0,
題目
Given a 2D arrayA, each cell is 0 (representing sea) or 1 (representing land)
A move consists of walking from one land square 4-directionally to another land square, or off the bound
題目
Given a numberN, return a string consisting of"0"s and"1"sthat represents its value in base-2
The returned string must have no leading zeroes, unless the string is"0".
Example 1:
題目
Normally, the factorial of a positive integernis the product of all positive integers less than or equal ton. For example,factorial(10) = 10 * 9 * 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1.
We i
題目
On a broken calculator that has a number showing on its display, we can perform two operations:
Double: Multiply the number on the display by 2, or;
Decrement: Subtract 1 fr
題目
For a non-negative integerX, thearray-form ofXis an array of its digits in left to right order. For example, ifX = 1231, then the array form is[1,2,3,1].
Given the array-formAof a no
題目
Given an array A of positive lengths, return the largest perimeter of a triangle with non-zero area, formed from 3 of these lengths.
If it is impossible to form any triangle of non-zero area, retur