上一页 1 2 3 4 5 6 ··· 30 下一页
摘要: Unique Word AbbreviationAn abbreviation of a word follows the form . Below are some examples of word abbreviations:a) it --> it ... 阅读全文
posted @ 2015-10-02 12:52 Eason Liu 阅读(1309) 评论(1) 推荐(0) 编辑
摘要: Find the Duplicate NumberGiven an arraynumscontainingn+ 1 integers where each integer is between 1 andn(inclusive), prove that at least one duplicate ... 阅读全文
posted @ 2015-09-28 13:41 Eason Liu 阅读(418) 评论(0) 推荐(0) 编辑
摘要: Walls and GatesYou are given am x n2D grid initialized with these three possible values.-1- A wall or an obstacle.0- A gate.INF- Infinity means an emp... 阅读全文
posted @ 2015-09-25 13:02 Eason Liu 阅读(638) 评论(0) 推荐(0) 编辑
摘要: Expression Add OperatorsGiven a string that contains only digits0-9and a target value, return all possibilities to addbinaryoperators (not unary)+,-, ... 阅读全文
posted @ 2015-09-22 16:43 Eason Liu 阅读(413) 评论(0) 推荐(0) 编辑
摘要: Inorder Successor in BSTGiven a binary search tree and a node in it, find the in-order successor of that node in the BST.Note: If the given node has n... 阅读全文
posted @ 2015-09-22 14:47 Eason Liu 阅读(672) 评论(0) 推荐(0) 编辑
摘要: Peeking IteratorGiven an Iterator class interface with methods:next()andhasNext(), design and implement a PeekingIterator that support thepeek()operat... 阅读全文
posted @ 2015-09-21 18:40 Eason Liu 阅读(344) 评论(0) 推荐(0) 编辑
摘要: 最小调整有序题目描述有一个整数数组,请编写一个函数,找出索引m和n,只要将m和n之间的元素排好序,整个数组就是有序的。注意:n-m应该越小越好,也就是说,找出符合条件的最短序列。给定一个int数组A和数组的大小n,请返回一个二元组,代表所求序列的起点和终点。(原序列位置从0开始标号,若原序列有序,返... 阅读全文
posted @ 2015-09-20 22:41 Eason Liu 阅读(442) 评论(0) 推荐(0) 编辑
摘要: Single Number IIIGiven an array of numbersnums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find t... 阅读全文
posted @ 2015-09-16 00:11 Eason Liu 阅读(192) 评论(0) 推荐(0) 编辑
摘要: Zigzag IteratorGiven two 1d vectors, implement an iterator to return their elements alternately.For example, given two 1d vectors:v1 = [1, 2]v2 = [3, ... 阅读全文
posted @ 2015-09-14 13:02 Eason Liu 阅读(618) 评论(0) 推荐(0) 编辑
摘要: Wiggle SortGiven an unsorted arraynums, reorder itin-placesuch thatnums[0] = nums[2] & nums) { 4 int flag = 1; 5 for (int i = 1; i < n... 阅读全文
posted @ 2015-09-10 18:37 Eason Liu 阅读(1336) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 30 下一页