题目Given a set of distinct integers, nums, return all possible subsets (the power set).
Note: The solution set must not contain duplicate subsets.
Exam
...
题目You are given a doubly linked list which in addition to the next and previous pointers, it could have a child pointer, which may or may not point to
...
题目Given a binary tree, write a function to get the maximum width of the given tree. The width of a tree is the maximum width among all levels. The bin
...
题目Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the
...
题目You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water.
Grid cells are connected horizontally/
...
题目Given a non-empty array of digits representing a non-negative integer, plus one to the integer.
The digits are stored such that the most significant
...
题目The Hamming distance between two integers is the number of positions at which the corresponding bits are different.
Given two integers x and y, calc
...
题目Write a program to find the n-th ugly number.
Ugly numbers are positive numbers whose prime factors only include 2, 3, 5.
Example:
123Input: n = 10
...
题目There are 8 prison cells in a row, and each cell is either occupied or vacant.
Each day, whether the cell is occupied or vacant changes according to
...
题目Given a binary tree, return the bottom-up level order traversal of its nodes’ values. (ie, from left to right, level by level from leaf to root).
Fo
...