上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 36 下一页
摘要: Given two strings, find the longest common substring.Return the length of it.NoteThe characters in substring should occur continiously in original str... 阅读全文
posted @ 2014-12-31 23:13 LiBlog 阅读(172) 评论(0) 推荐(0) 编辑
摘要: Count the number of k's between 0 and n. k can be 0 - 9.Exampleif n=12, in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], we have FIVE 1's (1, 10, 11, 12... 阅读全文
posted @ 2014-12-31 08:33 LiBlog 阅读(1184) 评论(0) 推荐(0) 编辑
摘要: Compare two strings A and B, determine whether A contains all of the characters in B.The characters in string A and B are all Upper Case letters.Examp... 阅读全文
posted @ 2014-12-31 07:30 LiBlog 阅读(502) 评论(0) 推荐(0) 编辑
摘要: For given numbers a and b in function aplusb, return the sum of them.NoteYou don't need to parse the input and output. Just calculate and return.Examp... 阅读全文
posted @ 2014-12-31 06:39 LiBlog 阅读(2272) 评论(0) 推荐(0) 编辑
摘要: Design an iterator over a binary search tree with the following properties:Elements are visited in ascending order (i.e. an inorder traversal)next() a... 阅读全文
posted @ 2014-12-31 06:14 LiBlog 阅读(364) 评论(0) 推荐(0) 编辑
摘要: The code base version is an integer and start from 1 to n. One day, someone commit a bad version in the code case, so it caused itself and the followi... 阅读全文
posted @ 2014-12-31 05:28 LiBlog 阅读(238) 评论(0) 推荐(0) 编辑
摘要: Given a root of Binary Search Tree with unique value for each node. Remove the node with given value. If there is no such a node with given value in t... 阅读全文
posted @ 2014-12-30 07:19 LiBlog 阅读(516) 评论(0) 推荐(0) 编辑
摘要: Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space i... 阅读全文
posted @ 2014-12-30 07:18 LiBlog 阅读(221) 评论(0) 推荐(0) 编辑
摘要: Given an array ofnobjects with k different colors (numbered from 1 to k), sort them so that objects of the same color are adjacent, with the colors in... 阅读全文
posted @ 2014-12-30 06:22 LiBlog 阅读(223) 评论(0) 推荐(0) 编辑
摘要: Write an efficient algorithm that searches for a value in an m x n matrix, return the occurrence of it.This matrix has the following properties: * In... 阅读全文
posted @ 2014-12-30 05:44 LiBlog 阅读(267) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 36 下一页