搜索
您的当前位置:首页正文

LintCode问题图解-46

来源:二三娱乐

本文准备讲解1个简单的算法编程问题, 这个算法编程问题来自LintCode平台。不了解.LintCode平台的读者可以阅读笔者文章(在线编程平台推荐-LeetCode)。问题的英文版本描述如下:

Longest Common Prefix

Example

For strings "ABCD", "ABEF" and "ACEF", the LCP is "A".

For strings "ABCDEFG", "ABCEFG" and "ABCEFA", the LCP is "ABC".

介绍1种简单高效的算法。

简单高效的算法
Top