Very nice explanation. Pura ka pura logic samajh gaya. Apke logic se code maine khud hi solve kar diya. Thanks Sir!!! (That superbike sound in the BG tho...)
@codestorywithMIK10 ай бұрын
😇🙌🙏 Thanks a lot
@aakarsh9879 ай бұрын
Damn I saw so many explanations but couldn't understand anyone, you explained in a magical way, it was so amazing, thank you!!
@Anikashukla18083 ай бұрын
whats the time and space complexity?
@MounikaEMB Жыл бұрын
Just started strings playlist.😊 As per question its hard to understand but after your explanation it is easy for me to understand... Thank you for making such a great videos for us🙏
@codestorywithMIK Жыл бұрын
So glad it helped Thank you 😇🙏
@csengineer881926 күн бұрын
sir pheli baar hindi dekhi coding ke question ... pura 1-12th ka hindi medium school yaad agya
@ArjunSaxena-wl3qs9 ай бұрын
Amazing ! . . . . . . class Solution: def countAndSay(self, n: int) -> str: if n == 1 : return '1' def helper(n) : if n == 1 : return '1' say = helper(n - 1) # processing i,j = 0,1 res = '' count = 1 while j < len(say) : if say[i] == say[j] : count += 1 else: res += str(count) + say[i] count = 1 i = j j += 1 res += str(count) + say[i] return res return helper(n)
@vineetjadhav17852 ай бұрын
Very Great Explaination ❤❤👋👋
@souravjoshi22932 жыл бұрын
Dude this became so easy. Thanks
@sp_94673 ай бұрын
Very nice handwriting
@akshatprakash1265 ай бұрын
great explanation! hidden gem of a video
@knight-z1x4 ай бұрын
bdiya smjha ya apne
@_PRANAYMATE3 ай бұрын
Understood and code it on my own thanks bro
@AjitKumar-jr7jo Жыл бұрын
Today i sit in a OA of a company ,and it is the 1st question out of 3 , i could not understand this question, i totally got panicked and won't able to solve a single question.;)
@codestorywithMIK Жыл бұрын
Thank you for sharing but it’s ok, keep practising and soon you will be able to crack interviews. Would you mind sharing which company’s OA was it ?
@AjitKumar-jr7jo Жыл бұрын
@@codestorywithMIK it is on-campus company name is zessta.
@DevOpskagyaan10 ай бұрын
Such a fine explanation man. 🙌
@leo716487 ай бұрын
One of the best explanation and as you said explanation on Leetcode is Pathetic, Keep it up
@jagadeeshp1163 Жыл бұрын
class Solution: def rec(self,n): if n==1: return "1" temp=self.rec(n-1) count=1 ch=temp[0] ns="" for i in range(1,len(temp)): if temp[i]==ch: count+=1 elif ch!=temp[i]: ns+=str(count)+ch ch=temp[i] count=1 ns+=str(count)+ch return ns def countAndSay(self, n: int) -> str: return self.rec(n) Done✅
@sayantanpoddar542811 ай бұрын
please came up with " Remove Outermost Parentheses" solution
@RohitGupta-xf3zp Жыл бұрын
nice bhaiya tgra logic build and inituiton
@codestorywithMIK Жыл бұрын
Thank you so much ❤️
@kiranshelar2961 Жыл бұрын
Excellent explanation!
@codestorywithMIK Жыл бұрын
Glad it was helpful! ❤️❤️
@Rajnish-pu8mj5 ай бұрын
great teacher
@pranavmaiya4386Ай бұрын
bro but this goes off to exponential complexity (2^n) , if interviewer expects us to optimize it then ?
@_Deepak__Verma8 ай бұрын
why length is say.length() instead of i
@ShivamGupta-cx3hy2 жыл бұрын
Thank you sir 😊
@codestorywithMIK2 жыл бұрын
Appreciate your comments ❤️
@pranavmaiya4386Ай бұрын
what about the follow up question ?
@mohdafzal40177 ай бұрын
Thanks alot.. feedback- you need to level up your thumbnail game
@santoshbhatnagar21556 ай бұрын
what is the time complexity for this question?
@TechVIP Жыл бұрын
What is the time complexity for this?
@mgnfy-view11 ай бұрын
I coded the same solution with typescript but got a low score on time and space complexity.
@jeethora5865 ай бұрын
please explain time ans space complexity
@B_Patidar88Ай бұрын
Bhaiya java me solve karvao pls
@PakIslam2012 Жыл бұрын
why recursion, why not a for loop?
@codestorywithMIK Жыл бұрын
You can loop this too i guess. Recursion seems more easy to me . So i choose Recursion mostly
@beinginnit Жыл бұрын
Paypal asked this question in it's offcampus interview😅😅
@allmovies24734 ай бұрын
Noise cancellation wala mic use✅Please✅
@codestorywithMIK4 ай бұрын
Sure ❤️
@mayankkumar66285 ай бұрын
bhai tera explaination poora dekhne se pehle hi karliya if n ==1: return str(1) else : temp = str(self.countAndSay(n-1)) prev = temp[0] length=1 ans="" for i in range(1,(len(temp))): if prev == temp[i] : length+=1 else : ans =ans+str(length) ans +=prev prev = temp[i] length =1 ans +=str(length) ans +=prev return ans
@carefree_ladka22 күн бұрын
var countAndSay = function (n) { if (n === 1) return '1'; return countAndSay(n - 1) .match(/1+|2+|3+/g) .reduce((acc, nums) => acc += `${nums.length}${nums[0]}`, '') }; much simpler