A Function that returns the longest common prefix from the array of strings
string commonPrefix ( string arr [ ] , int n ) { string prefix = arr [ 0 ] ; for ( int i = 1 ; i <= n - 1 ; i ++ ) prefix = commonPrefixUtil ( prefix , arr [ i ] ) ; return ( prefix ) ; }