题目Given a 2D board and a word, find if the word exists in the grid.
The word can be constructed from letters of sequentially adjacent cell, where “adj
...
题目Given two binary strings, return their sum (also a binary string).
The input strings are both non-empty and contains only characters 1 or 0.
Example
...
题目There are a total of n courses you have to take, labeled from 0 to n-1.
Some courses may have prerequisites, for example to take course 0 you have t
...
题目Given a non-empty array of integers, return the k most frequent elements.
Example 1:
12Input: nums = [1,1,1,2,2,3], k = 2Output: [1,2]
Example 2:
1
...
题目Implement pow(x, n), which calculates x raised to the power n (x^n).
Example 1:
12Input: 2.00000, 10Output: 1024.00000
Example 2:
12Input: 2.10000,
...
题目Given two numbers, hour and minutes. Return the smaller angle (in degrees) formed between the hour and the minute hand.
Example 1:
12Input: hour = 1
...
题目Given two binary trees, write a function to check if they are the same or not.
Two binary trees are considered the same if they are structurally ide
...
题目Reverse bits of a given 32 bits unsigned integer.
Example 1:
123Input: 00000010100101000001111010011100Output: 00111001011110000010100101000000Expla
...