题目 Given a collection of intervals, find the minimum number of intervals you need to re...
题目 Given a collection of intervals, find the minimum number of intervals you need to re...
题目 Assume you are an awesome parent and want to give your children some cookies. But, y...
题目 Given an unsorted array of integers, find the length of longest increasing subsequen...
题目 You are a professional robber planning to rob houses along a street. Each house has ...
题目 You are climbing a stair case. It takes n steps to reach to the top. Each time you c...
题目 Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An...
题目 The n-queens puzzle is the problem of placing n queens on an n×n chessboard such tha...
题目 Given a 2D board and a word, find if the word exists in the grid. The word can be co...
题目 Given two integers n and k, return all possible combinations of k numbers out of 1 ....
题目 Given a collection of distinct integers, return all possible permutations. Example: ...
Given a string containing digits from 2-9 inclusive, return all possible letter combina...
题目 Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given...
题目 You are given a binary tree in which each node contains an integer value. Find the n...
题目 Given a binary tree, return all root-to-leaf paths. Note: A leaf is a node with no c...
题目 Given a binary tree and a sum, determine if the tree has a root-to-leaf path such th...
题目 Invert a binary tree. Example: Input: Output:* 解法思路(一) 反转一棵二叉树,就是将每个节点的左右孩子交换,很递归; ...
题目 Given a binary tree, find its maximum depth. The maximum depth is the number of node...
题目 Given a non-empty array of integers, return the k most frequent elements. Example 1:...
题目 Given a positive integer n, find the least number of perfect square numbers (for exa...
题目 Given a binary tree, return the postorder traversal of its nodes' values. Example: I...