Objective: Write an algorithm to find The Longest Sequence Of Prefix Shared By All The Words In A String. This interesting problem was asked in the Google interview for software engineer. This problem is bit tricky, it looks difficult but actually it is simple problem.
Input: A String
Output: The longest sequence of prefix common in all the words in a string
“Bedroom BedClock BedTable BedWall” => “Bed”