MCPcopy Create free account
hub / github.com/LjyYano/LeetCode / L0014_LongestCommonPrefix

Class L0014_LongestCommonPrefix

src/main/java/L0014_LongestCommonPrefix.java:16–68  ·  view source on GitHub ↗

题目链接:https://leetcode.cn/problems/longest-common-prefix/ 编写一个函数来查找字符串数组中的最长公共前缀。 如果不存在公共前缀,返回空字符串 ""。 示例 1: 输入:strs = ["flower","flow","flight"] 输出:"fl" 示例 2: 输入:strs = ["dog","racecar","car"] 输出:"" 解释:输入不存在公共前缀。

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected