Longest Common Prefix

Write a function to find the longest common prefix string amongst an array of strings.

Solution: BUG FREE! Exciting muhaha...

But I have to admit that this one is simple...
Find that I have another solution in Nov. 10, 2012... Combined two solution here. The following solution first find the shortest sequence and then use it as a baseline.

Comments

Popular posts from this blog

Maximum Gap

[ITint5] Maximum Subarray for a Circular Array

[CC150] Chapter 4 Trees and Graphs