Longest Common Prefix

Given an array of strings, return the longest common prefix shared by all of them. If none exists, return an empty string.

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

Longest Common Prefix

Given an array of strings, return the longest common prefix shared by all of them. If none exists, return an empty string.