Longest Common Prefix - LeetCode
Goal
// Example 1:
Input: strs = ["flower","flow","flight"]
Output: "fl"
// Example 2:
Input: strs = ["dog","racecar","car"]
Output: ""
Explanation: There is no common prefix among the input strings.Problem Constraints
Problem Requirement Breakdown
Possible Solutions
Connected Readings
PreviousSubtract each value from the target, see if the difference exists in the listNextCompare all possible prefixes
Last updated