摘要:
Given an unsorted array of integers, find the length of the longest consecutive elements sequence. Clarification Your algorithm should run in O(n) com 阅读全文
摘要:
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 = " 阅读全文
摘要:
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" 阅读全文
摘要:
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 阅读全文