摘要:
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo 阅读全文
摘要:
The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the "root." Besides the root, each hou 阅读全文
摘要:
https://leetcode.com/problems/combination-sum/ Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find a 阅读全文
摘要:
https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/ Given a binary tree, find the lowest common ancestor (LCA) of two given nodes i 阅读全文
摘要:
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: No 阅读全文
摘要:
There are N students in a class. Some of them are friends, while some are not. Their friendship is transitive in nature. For example, if A is a direct 阅读全文
摘要:
Given a 2D array A, each cell is 0 (representing sea) or 1 (representing land) A move consists of walking from one land square 4-directionally to anot 阅读全文
摘要:
Given a picture consisting of black and white pixels, and a positive integer N, find the number of black pixels located at some specific row R and col 阅读全文
摘要:
Given a picture consisting of black and white pixels, find the number of black lonely pixels. The picture is represented by a 2D char array consisting 阅读全文
摘要:
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, return all 阅读全文