pyassistant

Longest Common Prefix

Given a list of strings, write a function to find the longest common prefix amongst them. If there is no common prefix, return an empty string.

Example:

Input:
["flower", "flow", "flight"]
Output:
"fl"

Make sure you return your solution, don't print!

AI

Bot

Trying to solve my challenge? Ask if you must, or press the purple button so I can analyze your code.