diff --git a/C++/14_palindromepartioning.cpp b/C++/14_palindromepartioning.cpp new file mode 100644 index 0000000..9e985bb --- /dev/null +++ b/C++/14_palindromepartioning.cpp @@ -0,0 +1,34 @@ +#include +#include +using namespace std; +bool isPalindrome(string s, int start, int end){ + while(start<=end){ + if(s[start++]!=s[end--]){ + return false; + } + } + return true; +} +void solve(string s, vectorout, int idx){ + if(idx==s.size()){ + for(auto it:out){ + cout<out; + int idx=0; + solve(s,out,idx); + +} \ No newline at end of file