Nice explanation Liked your approach to solve the problem .
@preetu3916 ай бұрын
Thank you! 😁
@shivamagarwal40056 ай бұрын
Amazing explanation 🔥🔥
@preetu3916 ай бұрын
Thank you!
@qwertyqwerty20906 ай бұрын
ma'am please iss question ko only ' string' se solve karke dekhiye not by stack , it will be very useful for us to develop beginner level intuition
@preetu3916 ай бұрын
I did not understand, string se kaise?
@qwertyqwerty20906 ай бұрын
@@preetu391 ma'am stack use na karke string use kare , ek empty string le sakte h aur usme hi operation kar sakte h jo stack me liye h operations Agar aap kar degi to help hogi 🙏🙏
@preetu3916 ай бұрын
@@qwertyqwerty2090the logic there will remain the same You can use string as stack. Stack pop operation can be done using string back function
@qwertyqwerty20906 ай бұрын
@@preetu391okay thanku ma'am
@UECPAPPUKUMAR6 ай бұрын
neat and clean code with nice explanation Now im your subscriber ❤
@preetu3916 ай бұрын
Thank you! 😊 Keep going! ✨
@pankajvishwakarma32466 ай бұрын
Great Explanation 💯💯
@preetu3916 ай бұрын
Thank you!
@vinaymaurya92016 ай бұрын
Nice explanation
@preetu3916 ай бұрын
Thank you!
@BadalKumar-gv3xu6 ай бұрын
following you from the past 30 days and now thora bahut logic lag ja raha question mai like some test cases pass ho ja rahai btw aapnai kitnai din liyay dsa complete karnai mai??
@preetu3916 ай бұрын
dsa kabhi complete nhi hota. keep practicing that's all i can say
@mohdkhaleeq74686 ай бұрын
i am not able to solve daily challenge problem myself . How should i improve even i am not able to think logic how to solve and which data structure is used?
@preetu3916 ай бұрын
In DSA its all about practice and patterns. Most of the problems can be solved using these patterns. So what you can do is when you solve a daily challenge without the need of seeing videos or with doesn't matter, you have to make sure you practice similar kind of pattern problems given in suggested questions or you can google also. So it helps you build an intuition and when again the same pattern problem will be there you will be able to atleast approach the problem with some logic. At the end of the day everything boils down to consistent practice.
@nehulbhamare34126 ай бұрын
How would we have solved the question if consecutive k digits would be removed? In O(n) time complexity
@preetu3916 ай бұрын
When consecutive digits have to be removed then it essentially will be a substring problem, in that case fixed size sliding window could be used.
@nehulbhamare34126 ай бұрын
But how to solve in O(n) , because substr function will tak O(n) time so O(n^2) time complexity
@nehulbhamare34126 ай бұрын
Can you give the code? How to solve it?
@preetu3916 ай бұрын
@@nehulbhamare3412 we don't need to use substr. Please see a tutorial on sliding window, you will get it.
@preetu3916 ай бұрын
@@nehulbhamare3412 Google fixed size sliding window
@Ashwinmahajan-ld6qt6 ай бұрын
in example 1 what if we remove 432 and after interchanging digits we are getting smallest digit as '1129' can you explain this please
@preetu3916 ай бұрын
That's what we have removed and got 1219 You can't change the order of digits
@Ashwinmahajan-ld6qt6 ай бұрын
@@preetu391 okay !! so we cant change order of digits...then why to consider the factorial ways as factorials we can get by rearranging order... can you please explain that?
@preetu3916 ай бұрын
@@Ashwinmahajan-ld6qt If you listen in the beginning I have said we can't change the order. Factorial ways I had only shown to highlight the intuition that when numbers are in increasing order we are sure to get smallest possible number only. There also I have told that we have to do the same that is to find an increasing sequence to reach as close to it as we can. Otherwise won't the problem be too easy, just sort the string and get the answer.
@Ashwinmahajan-ld6qt6 ай бұрын
@@preetu391 thanks
@tahavirdiwala48816 ай бұрын
Can we get codeforces?
@preetu3916 ай бұрын
Hi! Codeforces editorials you can find on coding75.com
@hiteshpatwal96886 ай бұрын
Why I am getting MLE 🤐🤐🤐🤐🤐🤐on the last test case
@preetu3916 ай бұрын
I too did in my first submission. Don't really know why but I'll revert back if I find out