上一页 1 2 3 4 5 6 7 8 9 10 ··· 14 下一页
摘要: Design your implementation of the circular double-ended queue (deque). Your implementation should support following operations: MyCircularDeque(k): Co 阅读全文
posted @ 2019-01-12 19:16 yuxihong 阅读(124) 评论(0) 推荐(0)
摘要: Given four lists A, B, C, D of integer values, compute how many tuples (i, j, k, l) there are such that A[i] + B[j] + C[k] + D[l] is zero. To make pro 阅读全文
posted @ 2019-01-12 17:56 yuxihong 阅读(124) 评论(0) 推荐(0)
摘要: We are stacking blocks to form a pyramid. Each block has a color which is a one letter string, like `'Z'`. For every block of color `C` we place not i 阅读全文
posted @ 2019-01-12 17:30 yuxihong 阅读(328) 评论(0) 推荐(0)
摘要: Given two non-negative integers x and y, an integer is powerful if it is equal to x^i + y^j for some integers i >= 0 and j >= 0. Return a list of all  阅读全文
posted @ 2019-01-11 19:34 yuxihong 阅读(234) 评论(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-01-11 17:29 yuxihong 阅读(190) 评论(0) 推荐(0)
摘要: Let's play the minesweeper game (Wikipedia, online game)! You are given a 2D char matrix representing the game board. 'M' represents an unrevealed min 阅读全文
posted @ 2019-01-11 15:22 yuxihong 阅读(160) 评论(0) 推荐(0)
摘要: Given an array A, we can perform a pancake flip: We choose some positive integer k <= A.length, then reverse the order of the first k elements of A. W 阅读全文
posted @ 2019-01-11 14:38 yuxihong 阅读(222) 评论(0) 推荐(0)
摘要: In a forest, each rabbit has some color. Some subset of rabbits (possibly all of them) tell you how many other rabbits have the same color as them. Th 阅读全文
posted @ 2019-01-04 14:08 yuxihong 阅读(113) 评论(0) 推荐(0)
摘要: Given an array of citations sorted in ascending order (each citation is a non-negative integer) of a researcher, write a function to compute the resea 阅读全文
posted @ 2019-01-04 01:21 yuxihong 阅读(122) 评论(0) 推荐(0)
摘要: Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination should be 阅读全文
posted @ 2019-01-02 13:23 yuxihong 阅读(95) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 14 下一页