diff --git a/38. Count and Say1 b/38. Count and Say1 new file mode 100644 index 0000000..a965e5c --- /dev/null +++ b/38. Count and Say1 @@ -0,0 +1,36 @@ +class Solution { +public: + string ans=""; + bool found=false; + void fn(string &temp,int n){ + if(found)return; + if(n==1){ + ans=temp; + found=true; + return; + } + + char pre=temp[0]; + string s=temp; + string str=""; + int cnt=1; + for(int i=1;i