Adding Spaces to a String | Straight Forward Easy | Leetcode 2109 | codestorywithMIK

  Рет қаралды 3,652

codestorywithMIK

codestorywithMIK

Күн бұрын

Пікірлер: 32
@Anonymous-bg7if
@Anonymous-bg7if 16 күн бұрын
sir in editorial this problem was solved using stringstream , it would be great if you explain a little bit about stringstream in next potd video.
@codestorywithMIK
@codestorywithMIK 16 күн бұрын
Hey there, Oh i didn’t notice that. But yes indeed stringstream can be used to solve this. I will make a separate video on stringstream. But meanwhile, search stringstream in this link - github.com/MAZHARMIK/Cpp-STL-Quick-Help You will get to know a lot of things
@amanpaliwalvlogs6860
@amanpaliwalvlogs6860 15 күн бұрын
Radhe Radhe ❤
@codestorywithMIK
@codestorywithMIK 15 күн бұрын
Radhe Radhe Aman ❤️😇🙏
@AkhileshChouhan-d4v
@AkhileshChouhan-d4v 16 күн бұрын
Great content
@codestorywithMIK
@codestorywithMIK 16 күн бұрын
🙏❤️😇
@MohammedHasmi577
@MohammedHasmi577 16 күн бұрын
Sir i am biggest fan of you❤
@aws_handles
@aws_handles 16 күн бұрын
Me too bro 😁
@piyush0mandloi
@piyush0mandloi 16 күн бұрын
Thank you sir
@JagannathDebGunin
@JagannathDebGunin 16 күн бұрын
Dada,Can you please make a video on Sieve of eratosthenes?
@codestorywithMIK
@codestorywithMIK 16 күн бұрын
Oh yes yes. My bad i missed to update on this. This video is almost ready, just needed some editing and corrections. Will upload this week for sure ❤️
@oppo-px5hf
@oppo-px5hf 16 күн бұрын
@@codestorywithMIK yes need video on this plz
@aws_handles
@aws_handles 16 күн бұрын
yes please
@best4567
@best4567 16 күн бұрын
class Solution { public: string addSpaces(string s, vector& spaces) { int n = spaces.size(); for(int i=0 ; i
@cabbi9
@cabbi9 16 күн бұрын
Please cover yesterday’s CF contest’s question C
@hellsterkun8764
@hellsterkun8764 16 күн бұрын
Was able to solve today's question by writing code into a story, just as you taught us, Mik Sir❤ P.S.: Sir, please check your mail and revert back if possible.
@codestorywithMIK
@codestorywithMIK 16 күн бұрын
Awesome. My bad i might have missed the email. Can you please resend it ?
@HumanBeing-m1x
@HumanBeing-m1x 15 күн бұрын
please make video on manacher algorithm for longest palindrome string and also make video on z algorithm
@aizad786iqbal
@aizad786iqbal 16 күн бұрын
khud se kar liya but iska runtime kaafi high tha class Solution { public String addSpaces(String s, int[] spaces) { StringBuilder sb = new StringBuilder(s); int count = 0; for(int x : spaces){ sb.insert(x+count, ' '); count++; } return sb.toString(); } }
@hike_explorer
@hike_explorer 15 күн бұрын
EYES ON THE HOLE -MOTIVATION
@CHANDANKUMAR-ck3is
@CHANDANKUMAR-ck3is 16 күн бұрын
bhaya isn't like using the + while concatinating the string takes much space there ?
@christopherhenry981
@christopherhenry981 16 күн бұрын
bhaiya can u make a video to find no of nodes at a distance k from given node in tree
@DrOnZeR2022
@DrOnZeR2022 16 күн бұрын
Just use dfs and a count pointer every time u visit a node just update the count and when count is equal to k then return in this way u Can find no of nodes at a distance k .U can also use bfs that is easier than this
@AryanVats603
@AryanVats603 15 күн бұрын
my code string addSpaces(string s, vector& spaces) { int j=0; string ans=""; for(int i=0;i
@paragbansal3
@paragbansal3 16 күн бұрын
Esa same code mene java me Kiya toh tle aa raha hai
@codestorywithMIK
@codestorywithMIK 16 күн бұрын
Please share your core once. Let’s check
@AryanVats603
@AryanVats603 15 күн бұрын
write condition for pointer on spaces array also..coz u might be accessing array index beyond array size
@jain5184
@jain5184 16 күн бұрын
why i got memory limit exceed
@codestorywithMIK
@codestorywithMIK 16 күн бұрын
Please share your core once. Let’s check
@AryanGupta-2024
@AryanGupta-2024 15 күн бұрын
@@codestorywithMIK class Solution { public: string addSpaces(string s, vector& spaces) { string ans=""; int c=0; for(int i=0;i
@jain5184
@jain5184 15 күн бұрын
@@codestorywithMIK hello sir class Solution { public: string addSpaces(string s, vector& spaces) { string ss =""; int j = 0; for(int i = 0 ; i
@jeehub041
@jeehub041 16 күн бұрын
Bhaiya I think Time complexity would be just O(n) because we are using if condition which is O(1).❤
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 41 МЛН
Windows 10 Isn't Going to Save Linux
8:49
The Linux Cast
Рет қаралды 4,5 М.
Leetcode 1957. Delete Characters to Make Fancy String
6:57
vinitialize
Рет қаралды 128
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 898 М.
How I Mastered Data Structures and Algorithms in 8 Weeks
15:46
Aman Manazir
Рет қаралды 130 М.
Dynamic Programming isn't too hard. You just don't know what it is.
22:31
DecodingIntuition
Рет қаралды 209 М.
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН