摘要: 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) 编辑