diff --git a/longest common prefix b/longest common prefix new file mode 100644 index 00000000..28f2c2bc --- /dev/null +++ b/longest common prefix @@ -0,0 +1,17 @@ +class Solution { +public: + string longestCommonPrefix(vector& strs) { + string x = ""; + for(int i=0;i