
解题思路: 主要是用回溯算法来做,分别尝试 i+1, i - 1, j+1, j -1 四个方向。 因为每个元素都只访问一次,所以需要用boar...
Given a binary tree, return all root-to-leaf paths. For example, given t...
Given an array where elements are sorted in ascending order, convert it ...
You need to construct a binary tree from a string consisting of parenthe...
You need to construct a string consists of parenthesis and integers from...
Given a digit string, return all possible letter combinations that the n...
Given a sorted array of integers nums and integer values a, b and c. App...
Given an array of n integers nums and a target, find the number of index...
Given a list, rotate the list to the right by k places, where k is non-n...
文集作者