Longest Common Prefix
Lesson 20 of 20 in Coddy's Beginner Challenges - Practice Basic Concepts course.
Challenge
MediumWrite a function named longestCommonPrefix that gets an array of strings and returns the longest common prefix of all the strings in the array.
Examples,
longestCommonPrefix(["Hello, Bob", "Hello, Jake"])->"Hello, "longestCommonPrefix(["something", "somehow", "somewhat"])->"some"longestCommonPrefix(["example", "sample"])->""
Bonus - Make it a recursive function!
Try it yourself
char* longestCommonPrefix(char** a, int aSize) {
// Write code here
}