题目In a given grid, each cell can have one of three values:
the value 0 representing an empty cell;
the value 1 representing a fresh orange;
the value
...
题目You are given a binary tree in which each node contains an integer value.
Find the number of paths that sum to a given value.
The path does not need
...
题目Given a binary tree, return the vertical order traversal of its nodes values.
For each node at position (X, Y), its left and right children respecti
...
题目Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.
Find all the elements that appear t
...
题目Design a data structure that supports the following two operations:
12void addWord(word)bool search(word)
search(word) can search a literal word or
...
题目Given an integer (signed 32 bits), write a function to check whether it is a power of 4.
Example 1:
12Input: 16Output: true
Example 2:
12Input: 5Ou
...
题目Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
Note: For the purpose of this problem,
...
题目Design a HashSet without using any built-in hash table libraries.
To be specific, your design should include these functions:
add(value): Insert a
...
题目Given a word, you need to judge whether the usage of capitals in it is right or not.
We define the usage of capitals in a word to be right when one
...