摘要: 题目如下: Return the largest possible k such that there exists a_1, a_2, ..., a_k such that: Each a_i is a non-empty string; Their concatenation a_1 + a_2 阅读全文
posted @ 2019-08-05 16:32 seyjs 阅读(469) 评论(0) 推荐(0) 编辑
摘要: 题目如下: Implement a SnapshotArray that supports the following interface: SnapshotArray(int length) initializes an array-like data structure with the giv 阅读全文
posted @ 2019-08-05 16:02 seyjs 阅读(620) 评论(0) 推荐(0) 编辑
摘要: 题目如下: On an alphabet board, we start at position (0, 0), corresponding to character board[0][0]. Here, board = ["abcde", "fghij", "klmno", "pqrst", "u 阅读全文
posted @ 2019-08-05 15:32 seyjs 阅读(550) 评论(0) 推荐(0) 编辑
摘要: 题目如下: The Tribonacci sequence Tn is defined as follows: T0 = 0, T1 = 1, T2 = 1, and Tn+3 = Tn + Tn+1 + Tn+2for n >= 0. Given n, return the value of Tn 阅读全文
posted @ 2019-08-05 11:46 seyjs 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 题目如下: Consider a directed graph, with nodes labelled 0, 1, ..., n-1. In this graph, each edge is either red or blue, and there could be self-edges or 阅读全文
posted @ 2019-08-05 11:44 seyjs 阅读(401) 评论(0) 推荐(0) 编辑
摘要: 题目如下: Given two arrays of integers with equal lengths, return the maximum value of: |arr1[i] - arr1[j]| + |arr2[i] - arr2[j]| + |i - j| where the maxi 阅读全文
posted @ 2019-08-05 11:39 seyjs 阅读(744) 评论(0) 推荐(0) 编辑