Beyondsoft Group interview question

Find The Longest Common Prefix