Driver Code
int main ( ) { vector < string > input = { " zebra " , " dog " , " duck " , " dove " } ; vector < string > output = uniquePrefix ( input ) ; cout << " The ▁ shortest ▁ unique ▁ prefixes ▁ in ▁ sorted ▁ order ▁ are ▁ : ▁ STRNEWLINE " ; for ( auto i : output ) cout << i << ' ▁ ' ; return 0 ; }