上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 98 下一页
摘要: Given an array of integers A, find the sum of min(B), where B ranges over every (contiguous) subarray of A. Since the answer may be large, return the 阅读全文
posted @ 2019-04-11 18:11 Veritas_des_Liberty 阅读(371) 评论(0) 推荐(0) 编辑
摘要: Write an iterator that iterates through a run-length encoded sequence. The iterator is initialized by RLEIterator(int[] A), where A is a run-length en 阅读全文
posted @ 2019-04-10 22:14 Veritas_des_Liberty 阅读(227) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers A, consider all non-empty subsequences of A. For any sequence S, let the width of S be the difference between the maximum a 阅读全文
posted @ 2019-04-09 21:41 Veritas_des_Liberty 阅读(298) 评论(0) 推荐(0) 编辑
摘要: Two images A and B are given, represented as binary, square matrices of the same size. (A binary matrix has only 0s and 1s as values.) We translate on 阅读全文
posted @ 2019-04-08 11:58 Veritas_des_Liberty 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 1021. Remove Outermost Parentheses A valid parentheses string is either empty (""), "(" + A + ")", or A + B, where A and B are valid parentheses strin 阅读全文
posted @ 2019-04-07 20:39 Veritas_des_Liberty 阅读(233) 评论(0) 推荐(0) 编辑
摘要: Given string S and a dictionary of words words, find the number of words[i] that is a subsequence of S. Note: All words in words and S will only consi 阅读全文
posted @ 2019-04-06 21:09 Veritas_des_Liberty 阅读(283) 评论(0) 推荐(0) 编辑
摘要: An N x N board contains only 0s and 1s. In each move, you can swap any 2 rows with each other, or any 2 columns with each other. What is the minimum n 阅读全文
posted @ 2019-04-06 20:21 Veritas_des_Liberty 阅读(913) 评论(0) 推荐(0) 编辑
摘要: We have some permutation A of [0, 1, ..., N - 1], where N is the length of A. The number of (global) inversions is the number of i < j with 0 <= i < j 阅读全文
posted @ 2019-04-06 13:40 Veritas_des_Liberty 阅读(224) 评论(0) 推荐(0) 编辑
摘要: This question is the same as "Max Chunks to Make Sorted" except the integers of the given array are not necessarily distinct, the input array could be 阅读全文
posted @ 2019-04-06 12:39 Veritas_des_Liberty 阅读(247) 评论(0) 推荐(0) 编辑
摘要: Given an array arr that is a permutation of [0, 1, ..., arr.length - 1], we split the array into some number of "chunks" (partitions), and individuall 阅读全文
posted @ 2019-04-06 11:46 Veritas_des_Liberty 阅读(238) 评论(0) 推荐(0) 编辑
上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 98 下一页