From e7e1ad44318305a6169431a47400cea8b687992b Mon Sep 17 00:00:00 2001 From: chayan das Date: Fri, 18 Apr 2025 17:26:03 +0530 Subject: [PATCH] Create 38. Count and Say1 --- 38. Count and Say1 | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 38. Count and Say1 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