06 2019 档案

摘要:There are G people in a gang, and a list of various crimes they could commit. The th crime generates a and requires gang members to participate. If a 阅读全文
posted @ 2019-06-29 22:52 Grandyang 阅读(2253) 评论(0) 推荐(0) 编辑
摘要:We are given , a length string of characters from the set . (These letters stand for "decreasing" and "increasing".) A valid permutation is a permutat 阅读全文
posted @ 2019-06-26 23:22 Grandyang 阅读(6117) 评论(3) 推荐(0) 编辑
摘要:Starting with an undirected graph (the "original graph") with nodes from to , subdivisions are made to some of the edges. The graph is given as follow 阅读全文
posted @ 2019-06-23 23:49 Grandyang 阅读(2017) 评论(1) 推荐(0) 编辑
摘要:We have a sorted set of digits D, a non-empty subset of {'1','2','3','4','5','6','7','8','9'}. (Note that '0' is not included.) Now, we write numbers 阅读全文
posted @ 2019-06-20 23:53 Grandyang 阅读(2353) 评论(0) 推荐(0) 编辑
摘要:You are given eggs, and you have access to a building with floors from to . Each egg is identical in function, and if an egg breaks, you cannot drop i 阅读全文
posted @ 2019-06-18 22:09 Grandyang 阅读(7733) 评论(3) 推荐(2) 编辑
摘要:Write a class which collects daily price quotes for some stock, and returns the span of that stock's price for the current day. The span of the stock' 阅读全文
posted @ 2019-06-15 23:27 Grandyang 阅读(3280) 评论(3) 推荐(0) 编辑
摘要:Given an array of integers , consider all non empty subsequences of . For any sequence S, let the width of S be the difference between the maximum and 阅读全文
posted @ 2019-06-13 23:02 Grandyang 阅读(1699) 评论(0) 推荐(0) 编辑
摘要:Write an iterator that iterates through a run length encoded sequence. The iterator is initialized by , where is a run length encoding of some sequenc 阅读全文
posted @ 2019-06-11 22:47 Grandyang 阅读(2251) 评论(0) 推荐(1) 编辑
摘要:A string of lowercase letters is given. Then, we may make any number of moves . In each move, we choose one of the first letters (starting from the le 阅读全文
posted @ 2019-06-09 23:40 Grandyang 阅读(2799) 评论(0) 推荐(2) 编辑
摘要:Implement , a class which simulates the operation of a stack like data structure. has two functions: , which pushes an integer onto the stack. , which 阅读全文
posted @ 2019-06-07 22:34 Grandyang 阅读(3228) 评论(0) 推荐(0) 编辑
摘要:We have an array A of non-negative integers. For every (contiguous) subarray B = [A[i], A[i+1], ..., A[j]] (with i <= j), we take the bitwise OR of al 阅读全文
posted @ 2019-06-05 23:15 Grandyang 阅读(2554) 评论(6) 推荐(0) 编辑
摘要:Given a tree, rearrange the tree in in-order so that the leftmost node in the tree is now the root of the tree, and every node has no left child and o 阅读全文
posted @ 2019-06-03 22:40 Grandyang 阅读(3347) 评论(2) 推荐(0) 编辑
摘要:An array is monotonic if it is either monotone increasing or monotone decreasing. An array is monotone increasing if for all . Return if and only if t 阅读全文
posted @ 2019-06-01 23:54 Grandyang 阅读(2479) 评论(0) 推荐(0) 编辑

Fork me on GitHub

喜欢请打赏

扫描二维码打赏

Venmo 打赏

点击右上角即可分享
微信分享提示