摘要: 题目如下: We run a preorder depth first search on the root of a binary tree. At each node in this traversal, we output D dashes (where D is the depth of t 阅读全文
posted @ 2019-04-24 23:12 seyjs 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 题目如下: Given an array A of integers, return the length of the longest arithmetic subsequence in A. Recall that a subsequence of A is a list A[i_1], A[i 阅读全文
posted @ 2019-04-24 23:06 seyjs 阅读(916) 评论(0) 推荐(0) 编辑
摘要: 题目如下: Given the root of a binary tree, find the maximum value V for which there exists different nodes A and B where V = |A.val - B.val| and A is an a 阅读全文
posted @ 2019-04-24 23:02 seyjs 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 题目如下: There are 2N people a company is planning to interview. The cost of flying the i-th person to city A is costs[i][0], and the cost of flying the  阅读全文
posted @ 2019-04-24 22:56 seyjs 阅读(367) 评论(0) 推荐(0) 编辑
摘要: 题目如下: We are given a matrix with R rows and C columns has cells with integer coordinates (r, c), where 0 <= r < R and 0 <= c < C. Additionally, we are 阅读全文
posted @ 2019-04-24 22:51 seyjs 阅读(436) 评论(0) 推荐(0) 编辑
摘要: 题目如下: Given an array A of non-negative integers, return the maximum sum of elements in two non-overlapping (contiguous) subarrays, which have lengths  阅读全文
posted @ 2019-04-24 22:49 seyjs 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 题目如下: Implement the StreamChecker class as follows: StreamChecker(words): Constructor, init the data structure with the given words. query(letter): re 阅读全文
posted @ 2019-04-24 22:46 seyjs 阅读(515) 评论(0) 推荐(0) 编辑