COMMON PREFIX Two strings s1, s2 are passed as a parameter to the given function. Return the largest common prefix of the strings sl and s2. string commonPrefix(string s1, string s2){ / write your CPP code here
COMMON PREFIX Two strings s1, s2 are passed as a parameter to the given function. Return the largest common prefix of the strings sl and s2. string commonPrefix(string s1, string s2){ / write your CPP code here
Related questions
Question
100%

Transcribed Image Text:COMMON PREFIX
Two strings s1, s2 are passed as a parameter to the given function. Return the largest common prefix of the strings sl and s2.
string commonPrefix(string s1, string s2){
// write your CPP code here
}
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images
