上一页 1 2 3 4 5 6 7 8 9 ··· 14 下一页
摘要: Given two words word1 and word2, find the minimum number of steps required to make word1 and word2 the same, where in each step you can delete one cha 阅读全文
posted @ 2019-01-13 19:27 yuxihong 阅读(107) 评论(0) 推荐(0) 编辑
摘要: A sequence X_1, X_2, ..., X_n is fibonacci-like if: n >= 3 X_i + X_{i+1} = X_{i+2} for all i + 2 <= n Given a strictly increasing array A of positive 阅读全文
posted @ 2019-01-13 17:28 yuxihong 阅读(189) 评论(0) 推荐(0) 编辑
摘要: Starting with a positive integer N, we reorder the digits in any order (including the original order) such that the leading digit is not zero. Return  阅读全文
posted @ 2019-01-13 13:43 yuxihong 阅读(206) 评论(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-01-13 13:25 yuxihong 阅读(162) 评论(0) 推荐(0) 编辑
摘要: Given an array A of integers, return the number of (contiguous, non-empty) subarrays that have a sum divisible by K. Example 1: Input: A = [4,5,0,-2,- 阅读全文
posted @ 2019-01-13 13:11 yuxihong 阅读(175) 评论(0) 推荐(0) 编辑
摘要: We have a list of points on the plane. Find the K closest points to the origin (0, 0). (Here, the distance between two points on a plane is the Euclid 阅读全文
posted @ 2019-01-13 13:04 yuxihong 阅读(333) 评论(0) 推荐(0) 编辑
摘要: You are given an integer array A. From some starting index, you can make a series of jumps. The (1st, 3rd, 5th, ...) jumps in the series are called od 阅读全文
posted @ 2019-01-13 12:57 yuxihong 阅读(211) 评论(0) 推荐(0) 编辑
摘要: Write a class StockSpanner which collects daily price quotes for some stock, and returns the span of that stock's price for the current day. The span 阅读全文
posted @ 2019-01-13 10:09 yuxihong 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Given a C++ program, remove comments from it. The program source is an array where source[i] is the i-th line of the source code. This represents the 阅读全文
posted @ 2019-01-13 04:37 yuxihong 阅读(148) 评论(0) 推荐(0) 编辑
摘要: Given a (singly) linked list with head node root, write a function to split the linked list into k consecutive linked list "parts". The length of each 阅读全文
posted @ 2019-01-12 20:14 yuxihong 阅读(102) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 14 下一页