摘要: Given a list of dominoes, dominoes[i] = [a, b] is equivalent to dominoes[j] = [c, d] if and only if either (a==c and b==d), or (a==d and b==c) - that 阅读全文
posted @ 2020-07-13 23:35 whatyouthink 阅读(80) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array of integers, find the length of longest continuous increasing subsequence (subarray). 找最长连续上升子序列 class Solution(object): def f 阅读全文
posted @ 2020-07-13 23:30 whatyouthink 阅读(115) 评论(0) 推荐(0) 编辑
摘要: For a non-negative integer X, the array-form of X is an array of its digits in left to right order. For example, if X = 1231, then the array form is [ 阅读全文
posted @ 2020-07-13 23:22 whatyouthink 阅读(92) 评论(0) 推荐(0) 编辑
摘要: Given an array A of 0s and 1s, consider N_i: the i-th subarray from A[0] to A[i] interpreted as a binary number (from most-significant-bit to least-si 阅读全文
posted @ 2020-07-13 21:14 whatyouthink 阅读(108) 评论(0) 推荐(0) 编辑