上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 23 下一页
摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence. Clarification Your algorithm should run in O(n) com 阅读全文
posted @ 2016-03-26 08:25 哥布林工程师 阅读(97) 评论(0) 推荐(0) 编辑
摘要: Given two strings, find the longest common substring. Return the length of it. Example Given A = "ABCD", B = "CBCE", return 2. Given A = "ABCD", B = " 阅读全文
posted @ 2016-03-26 06:43 哥布林工程师 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Given two strings, find the longest common subsequence (LCS). Your code should return the length of LCS. Example For "ABCD" and "EDCA", the LCS is "A" 阅读全文
posted @ 2016-03-26 03:08 哥布林工程师 阅读(263) 评论(0) 推荐(0) 编辑
摘要: Given k strings, find the longest common prefix (LCP). For strings "ABCD", "ABEF" and "ACEF", the LCP is "A" For strings "ABCDEFG", "ABCEFG" and "ABCE 阅读全文
posted @ 2016-03-26 01:57 哥布林工程师 阅读(161) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, determine if it has a cycle in it. Example Given -21->10->4->5, tail connects to node index 1, return true Given -21->10->4->5, t 阅读全文
posted @ 2016-03-25 08:40 哥布林工程师 阅读(163) 评论(0) 推荐(0) 编辑
摘要: Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telepho 阅读全文
posted @ 2016-03-25 08:26 哥布林工程师 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Given a list of non negative integers, arrange them such that they form the largest number. Given [1, 20, 23, 4, 8], the largest formed number is 8423 阅读全文
posted @ 2016-03-25 08:05 哥布林工程师 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Find the kth smallest number in at row and column sorted matrix. Given k = 4 and a matrix: [ [1 ,5 ,7], [3 ,7 ,8], [4 ,8 ,9], ] return 5 public class 阅读全文
posted @ 2016-03-25 07:35 哥布林工程师 阅读(187) 评论(0) 推荐(0) 编辑
摘要: Find K-th largest element in an array. In array [9,3,2,4,8], the 3rd largest element is 4. In array [1,2,3,4,5], the 1st largest element is 5, 2nd lar 阅读全文
posted @ 2016-03-24 13:11 哥布林工程师 阅读(167) 评论(0) 推荐(0) 编辑
摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim 阅读全文
posted @ 2016-03-24 12:16 哥布林工程师 阅读(109) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 23 下一页