01 2019 档案

摘要:题目如下: 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 阅读全文
posted @ 2019-01-28 15:37 seyjs 阅读(576) 评论(0) 推荐(0)
摘要:题目如下: 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, 阅读全文
posted @ 2019-01-25 09:22 seyjs 阅读(555) 评论(0) 推荐(0)
摘要:题目如下: 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 阅读全文
posted @ 2019-01-23 12:58 seyjs 阅读(299) 评论(0) 推荐(0)
摘要:题目如下: 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 阅读全文
posted @ 2019-01-20 15:23 seyjs 阅读(488) 评论(0) 推荐(0)
摘要:题目如下: 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. 阅读全文
posted @ 2019-01-20 15:18 seyjs 阅读(422) 评论(0) 推荐(0)
摘要:题目如下: 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 阅读全文
posted @ 2019-01-07 16:21 seyjs 阅读(415) 评论(0) 推荐(0)
摘要:题目如下: 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 阅读全文
posted @ 2019-01-07 16:10 seyjs 阅读(421) 评论(0) 推荐(0)
摘要:题目如下: Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n? Example: 解题思路:一开始我觉得递归就行了,根节点可以填入的数为[1,2,3....n],如果 阅读全文
posted @ 2019-01-04 16:44 seyjs 阅读(141) 评论(0) 推荐(0)
摘要:题目如下: 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 阅读全文
posted @ 2019-01-04 13:27 seyjs 阅读(136) 评论(0) 推荐(0)
摘要:题目如下: Given the head of a graph, return a deep copy (clone) of the graph. Each node in the graph contains a label (int) and a list (List[UndirectedGra 阅读全文
posted @ 2019-01-03 16:18 seyjs 阅读(129) 评论(0) 推荐(0)
摘要:题目如下: Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum o 阅读全文
posted @ 2019-01-02 14:32 seyjs 阅读(161) 评论(0) 推荐(0)
摘要:题目如下: Suppose we abstract our file system by a string in the following manner: The string "dir\n\tsubdir1\n\tsubdir2\n\t\tfile.ext"represents: The dir 阅读全文
posted @ 2019-01-02 13:33 seyjs 阅读(241) 评论(0) 推荐(0)
摘要:题目如下: Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffe 阅读全文
posted @ 2019-01-01 19:03 seyjs 阅读(179) 评论(0) 推荐(0)