-
You are given an integer array nums and you have to return a new countsarray. The counts array has the property where counts[...
-
Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once and only once...
-
Given a 2D board and a list of words from the dictionary, find all words in the board.
Each word must be constructed from let...
-
Design a data structure that supports the following two operations:
12void addWord(word)bool search(word)
search(word) can s...
-
Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive...
-
Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered fr...
-
All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: “ACGAATTCCG”. When studying DNA, i...
-
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.
Below is ...
-
Given a 2D binary matrix filled with 0’s and 1’s, find the largest rectangle containing only 1’s and return its area.
Example...
-
Given a string s, you are allowed to convert it to a palindrome by adding characters in front of it. Find and return the shor...