Skip to content

Latest commit

 

History

History

Longest Common Prefix

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Given a set of strings, find the longest common prefix.

Input : {“geeksforgeeks”, “geeks”, “geek”, “geezer”} Output : "gee"

Input : {"apple", "ape", "april"} Output : "ap"