Min Li's Note
KVM,QEMU, X86 virtualization
Pages
Home
Collection
About
Sunday, November 30, 2014
Longest Common Prefix
Problem
Write a function to find the longest common prefix string amongst an array of strings.
Idea
找到最小的串,然后判断这个串的每个字符是否在其他串中的相同位置出现.
Solution
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment