摘要:
题目如下: On a 2-dimensional grid, there are 4 types of squares: 1 represents the starting square. There is exactly one starting square. 2 represents the 阅读全文
摘要:
题目如下: Given two integers A and B, return any string S such that: S has length A + B and contains exactly A'a' letters, and exactly B 'b' letters; The 阅读全文
摘要:
题目如下: Given an array A of integers, return the number of (contiguous, non-empty) subarrays that have a sum divisible by K. Example 1: Input: A = [4,5, 阅读全文
摘要:
题目如下: Given an array A of positive lengths, return the largest perimeter of a triangle with non-zero area, formed from 3 of these lengths. If it is im 阅读全文
摘要:
题目如下: We have a list of points on the plane. Find the Kclosest points to the origin (0, 0). (Here, the distance between two points on a plane is the E 阅读全文
摘要:
题目如下: Given an array of integers A sorted in non-decreasing order, return an array of the squares of each number, also in sorted non-decreasing order. 阅读全文
摘要:
题目如下: Given two non-negative integers x and y, an integer is powerful if it is equal to x^i + y^j for some integers i >= 0 and j >= 0. Return a list o 阅读全文
摘要:
题目如下: Given an array A, we can perform a pancake flip: We choose some positive integer k <= A.length, then reverse the order of the first k elements o 阅读全文
摘要:
题目如下: Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n? Example: 解题思路:一开始我觉得递归就行了,根节点可以填入的数为[1,2,3....n],如果 阅读全文
摘要:
题目如下: Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively. Below is one possible repres 阅读全文