Very few KZbinrs can maintain such consistency with such quality content 🔥
@inter398810 ай бұрын
great video whenever you show a new problem, I spend at least 30 min or more trying to solve it. Then if I can't or after solving, I see the solution you provide. Never thought problem solving would be this addictive
@incnomercy657310 ай бұрын
did you solve this problem 57:15 if yes please share the code
@sahilanand303 жыл бұрын
The best thing about this course is, it covers wide range of topics which is helpful for beginners as well as advance programmers!
@mdwaqar7401 Жыл бұрын
Finally Completed this Video after 5 days. Have to say this was the Toughest to Digest and Code and Understand so far in the journey But Worth every Second. Now I am much confident with String. Thanks Bhaiyya !! Onto the next video.
@dEviL_bIsWaJiT2 жыл бұрын
*Key Differences Between Character Array and String* A character array is a collection of variables which are of character datatype. String is a class that is instantiated to declare strings. Using index value you can access a character from a character array. On the other hand, if you want to access a particular character in a string, you can access it by function string’s_name.charAt(index). As an array is not a datatype similarly a character also is not a datatype. On the other hand, String being a class act as a reference type hence, it can be said String is a data type. You can not apply any operator on a character array whereas, you can apply operators on String. Being an array character array has a fixed length and its boundaries can be easily overrun. Where String does not have any boundaries. Array elements are stored in a contiguous memory location hence that can be accessed faster than string variable.
@AbhishekKumar-nz9dn2 жыл бұрын
thanks for this bro🙏👍
@prathamsharma50162 жыл бұрын
Very informative thank you
@sagarbiradar11042 жыл бұрын
Mast kam karta hai tu
@shivashiskar84212 жыл бұрын
ok rana bhaiii
@dEviL_bIsWaJiT2 жыл бұрын
@@shivashiskar8421 😅
@SandipDas-bd2pt3 жыл бұрын
This is my favourite channel. I especially like it when you explain everything so nicely. I wish you a lot of success with the channel and happy life.
@shubhamaths2 жыл бұрын
4 din lag geya 🥲🥲 Complete karne me.
@harshitverma27072 жыл бұрын
Ek din ka kaam hai bhai ye to
@rishabh_pant Жыл бұрын
We keep trying :) 💪
@suxsfulrecovery7161 Жыл бұрын
@@harshitverma2707 nah bhai humse ek din mai na hu paiga
@gauravbisht504 Жыл бұрын
Chota bachcha h kya😂
@shivakashyap5017 Жыл бұрын
Bhai mujhe 5 din lag gaye complete karne me , kyu bhai jab problem khud se apna 100% dekar solve karne than lete h to time lagta h , 5 minute dekar hamse na ho payega ye soch kar solution dekh lene se kiya phayada phle 2 se 3 ghante do problem ko nahi hua to phir solution dekho or uske bad bhi khud se karo
@mlkgpta2869 Жыл бұрын
In this 2 hours of lecture i learnt about 10 hours of content by going through other optimized solution in discussion section, refering different stl libraries for new function, learning from errors...
@ayushkushwaha1713 жыл бұрын
took me like 2 days to complete this video. really enjoyed it. thanks bro
@anishtripathi38006 ай бұрын
Bhaiya ye video maine 3 din me complete ki hai... Lekin ek ek explaination ko 2- 3 baar dekha, implement kiya.. aur cheezein samajh aane lagi. Thank you bhaiya.
@Gungun-ce4ox6 ай бұрын
are you also learn string 1st time?? i am following this playlist and all videos i understand easily but that particular video i didn't understand
@subrinasirajee21093 жыл бұрын
Hi Mr. Love Babbar. Your content is just amazing. Thank you so much from Bangladesh.
@sambhavsharma27802 жыл бұрын
for converting upper case to lower case simply add ( ch+32 ) and for converting lower case to upper case simply subtract ( ch-32 ).
@pranshul402 жыл бұрын
Please explain me the code when the string is 'aabbBcD' , then output is 'b' because maximum occurrence in string is b
@scoc55vora152 жыл бұрын
Amazing
@gurtegsinghsohi411 Жыл бұрын
@@scoc55vora15 can you provide answer of 57:15
@adityakant9736 Жыл бұрын
Because 'a' - 'A' is 32🐘
@deepanshusingh3623 Жыл бұрын
mere code me error de rha tha esa krne pe ....
@sayanmukherjee1445 Жыл бұрын
This is a really good course and more better than many premium courses of DS & Algo. Thank you is not enough for this course.
@codewithmames Жыл бұрын
hello bro
@Aatifkhan-pq6kv3 жыл бұрын
Present bhaiyya, I am on 1:00:45 timestamp........ To be honest, by far the best video ever watched on these topics❤️❤️ absolutely loving the way u mould us to solve any problem. You are a gem 💎
@arnobbaiga3092 жыл бұрын
bro 1:47:28 why he did char[ansindex++]?
@ravishekhawat5958 Жыл бұрын
@@arnobbaiga309 quki char ko store krne k baad ans vector ka index bgi increment krna pdega ... Tbhi to uske next index pr ya to char ya bhi uski occurrence daal payenge
@Raj_Tanvar3 жыл бұрын
I don't care about length I care only about content which is fantastic 👌
@apurbakumarmajumder94783 жыл бұрын
Me too bro Length doesn't matter, Quality is all that matters. And more over we have to learn this topics may not today then tomorrow but we all have to understand this topics so why not today.
@arnobbaiga3092 жыл бұрын
bro 1:47:28 why he did char[ansindex++]?
@darshanbhaiya871111 ай бұрын
after comparing it will atomatically increase the pointer @@arnobbaiga309
FOR MY REFERENCE:- A character array is a collection of variables which are of character datatype. String is a class that is instantiated to declare strings. Using index value you can access a character from a character array. On the other hand, if you want to access a particular character in a string, you can access it by function string’s_name.charAt(index). As an array is not a datatype similarly a character also is not a datatype. On the other hand, String being a class act as a reference type hence, it can be said String is a data type. You can not apply any operator on a character array whereas, you can apply operators on String. Being an array character array has a fixed length and its boundaries can be easily overrun. Where String does not have any boundaries. Array elements are stored in a contiguous memory location hence that can be accessed faster than string variable.
@yashkum095 Жыл бұрын
A character array is actually different from cstring, the thing he was using here was a cstring and not character array, try declaring a character array explicity by yourself as if it was an integer array, you'll see
@Vikram-Sharma-3 жыл бұрын
HW - 3 Auxilary space O(0) for space replacement with @40 problem string replaceSpaces(string &str){ // Write your code here. int l = str.length(); string rep = "@40"; for(int i = 0; i
@mohitbansal2222 жыл бұрын
str.replace(i,1,rep); esme 1 kis kiya likha ha
@ishratkaur16052 жыл бұрын
@@mohitbansal222 Probably because we have to replace a space of size 1 with the string rep.
@mohitbansal3212 жыл бұрын
@@ishratkaur1605 thanks
@avibirla98632 жыл бұрын
@@mohitbansal222 i,1 ..specifies range of indexes i.e till which range you have to replace
@rameshmalhotra95252 жыл бұрын
kzbin.info/www/bejne/qnK0en6bZbp6fpY
@muatasimahmed23433 жыл бұрын
Seeing you consistent My brains demands consistent from ...Ajj ka attendance laag gya😃 Thanks Bhaiyaa ☺️
@arnobbaiga3092 жыл бұрын
bro 1:47:28 why he did char[ansindex++]?
@aadityakumar86044 ай бұрын
ch-'A'+'a' ------> ch+32 likh sakte hai ( to convert capital to smallest) Or ch-32 for vice versa
@themindtreatment Жыл бұрын
very few youtubers can maintain such consistency with such quality content good job brother
@gurtegsinghsohi411 Жыл бұрын
Can you provide answer of 57:15
@md.ualiurrahmanrahat24003 жыл бұрын
You are like a superhero to us. Consistency is unbelievable!! You are a man of words Vaiya. You're keeping your promises. Salute.
@arnobbaiga3092 жыл бұрын
bro 1:47:28 why he did char[ansindex++]?
@abhishekmaurya6594 Жыл бұрын
@@arnobbaiga309 actually he is storing the old character in ansIndex and than post incremented
@artifice_abhi2 жыл бұрын
42:46 Valid Palindrome Apne jo approach check palindrome m btai usse kaafi asan hogya ... mne kaafi complex kardi thi approach class Solution { public: string toLowercase(string s){ string ans; for(int i = 0; i= 'A' && s[i] = 'a' && s[i] = '0' && s[i]
@imPriyansh77 Жыл бұрын
The way you broke down the problem in 3 steps at 54:58 is just awesome ! Thanks Bhaiya :)
@CentristPerspective Жыл бұрын
He misunderstood the question, the question doesn't states that
@shadprakash2 ай бұрын
@@CentristPerspective true, i also read the question, and it says to reverse the words, not the letters. eg :- input --> the sky is blue output --> blue is sky the He didn't pay it much attention and just read the title that's why he might've misunderstood ig, that's why there were no submissions as well lol, cuz he mistook that question for some other question.
@ravishsingla4454 Жыл бұрын
what a dedication this man has recorded the video from about 3:00 am to morning 6:40 am, Hats off to you. 🔥🔥
@satyamgoenka6287 Жыл бұрын
mai bhi itti hi dedication ke saath pubg khelta tha bro..kabhi🥲
@BOSS55 Жыл бұрын
ha yyar @@satyamgoenka6287
@043-h-subhashreebastia7 Жыл бұрын
thoda tough tha questions par bhaiya do baar dikhne se samajh aa rhi h thank you bhaiya☺
@newhope5729 Жыл бұрын
Didi please reply I request pleeees
@akashverma58802 жыл бұрын
#include #include using namespace std; int main() { string s = "my name is akash"; int start = 0; int p = 0; for (int i = 0; i
@MyAnish222 жыл бұрын
Akash, my code looks similar but it isnt working, can you review? #include #include using namespace std; void reversewordsinaString(string str){ int len = str.length()-1; int i = 0; int j = 0; int s = i; while (i
@ananyapandey81622 жыл бұрын
@@MyAnish22 bhai tune getline to declare Kiya Hua hai but utne koyi function ESA initialize hi nahi kiya jisme getline ho
@Mohddanish-ly4yx Жыл бұрын
Thank you
@aashutoshsathe8078 Жыл бұрын
thank you bro this was very helpful
@8BitGamerYT110 ай бұрын
can we do without losing the O(N) time complexity?
@ABHISHEKRAI-n9k5 ай бұрын
sir maja hi aa gaya question ban ja raha h jab aap acha sa samjha da raha h and kabhi kabhi 50 to 60% ma khud hi soch pa raha hoon jabki sirf 5 days hi hua h apki video dekha hua
@kailashdaata86103 жыл бұрын
I love this series, Thanks for providing this content. One feedback, plz explain the code by more dry run(specially permutation question), also 30-40 min video length will be good.
@sagarbiradar11042 жыл бұрын
I thought you put photo babbar than i realized on closer look that its not babbars photo but maybe your photo😁
@RAHUL-pe7jv2 жыл бұрын
@@sagarbiradar1104 😀
@AnujTiwari-g8o9 ай бұрын
bhaiya aapki 2 ghante ki video mere liyea poora din hota .... code samajhne me bhi time lagta hai..... apne end se errors aajae to unhe bhi solve karna hota hai ..... but i will never stop learning ....
@anuragpandey81653 жыл бұрын
Completed - 1:53:19 Great explanation.
@technologytrends6459 ай бұрын
//Happy that I am able to solve it //Homework - Remove All Adjacent Duplicates In String string removeDuplicates(string s) { int i=0; while( i < s.length() ){ if(s[i] == s[i+1]){ s.erase(i,2); if(i > 0){ i--; } } else{ i++; } } return s; }
@only_for_fun1234r3 жыл бұрын
Difficult for me, me studying string for 1st time but maja boht aya 🔥🔥
@tanishgupta75052 жыл бұрын
reverse of a string using stl is way simple : string babbar = "babbar"; reverse(babbar.begin() , babbar.end() ); cout
@sharedme44712 жыл бұрын
💡 HomeWork 1:17:12 - replace space [O(1) space solution] : for(int i=0;i
@cuteanime22 жыл бұрын
well done bro 👌
@kms83202 жыл бұрын
What is the time complexity of this? Is it O(N^2) ?
@sharedme44712 жыл бұрын
@@kms8320 O(N), bcs here is only one loop
@lateshbansal78012 жыл бұрын
iska output sai nhi aara
@devangsingh29502 жыл бұрын
actually this will become O(N2) in complexity because making substring in c++ will take linear time not constant time, also using insert will cause also O(N2), as it was given in cpp site that these operations are linear in T.C.
@Listenup831 Жыл бұрын
sir, aapke charno me mera shat shat naman, bahut lecture dekhne ke baad, aaj aapse string clear hua
@sherebanoburhani89393 жыл бұрын
Present bhaiya. I am still on lecture 8 (just busy with all my assignnents and internals of college😩😩😩) It's going to be an amazing video I am sure of that.
@RahulKumar-wt9qc2 жыл бұрын
Don't worry , try to manage time and never give up, best of luck 👍👍👍👍
@rameshmalhotra95252 жыл бұрын
kzbin.info/www/bejne/qnK0en6bZbp6fpY
@sourabhsingh59412 жыл бұрын
1:23:00 why are we checking this condition -> s.find(part) < s.length() what is the reason plz help
@rahulrastogi53123 жыл бұрын
Just finished the video...Haven't seen better way of teaching than this..#TheProblemSolvingWay... really grateful bhaiya ..one of the best videos of this course till date ❤️🙏🏻...1hr+ content really helps in many ways specially understanding
@shreyansh_yadav3 жыл бұрын
Just abhi poori vid complete hui, Mza aaya bhaiya
@anjanimittal9313 Жыл бұрын
Reverse Words: Code: #include using namespace std; void reverse(string &s, int x, int y) { while(x
@ankitsahu1575 Жыл бұрын
Thank you for your answer Anjali, it helped me a lot.
@ayushmanagarwal4323 Жыл бұрын
nice work
@Arcgamerz2711 ай бұрын
could you explain how: y=i-1 and x=y+2 came.
@ultrondanger120811 ай бұрын
nice
@champ-kx9lb9 ай бұрын
Thank you @anjanimittal9313 for your answer as this q was lock for non premium members!! can you explain me pls how first word is reversed? it will help me alot
@RohitKannaujiya-i1r3 ай бұрын
Aaj mja aa gya padhne me bas ab hamaari baari khud se solve karne ki inn sab question ko ❤ Ab aur mja aayega bhaiya❤❤❤🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉
@priyapandey89512 жыл бұрын
@Babbar Bhaiya, Homework at 1:17:12 it can be done in-place using replace method also:- string replaceSpaces(string &str){ // Write your code here. for(int i=0;str[i]!='\0';i++){ if(str[i]==32){ str.replace (i,1,"@40",0,3); } } return str; }
@anmol3 Жыл бұрын
@Hiranmay Formal can you provide me with the link to real solution, without using inbuilt functions. Thanks.
@anmol3 Жыл бұрын
@Seekersbay thanks a lot brother
@nityamtiwari85022 жыл бұрын
bhaiya yaar "Remove all occurrences of substring" mei jo approach lagai aapne , wo tagda tha , maja hi aa gaya sahi mein.
@awais_ansarii2 жыл бұрын
Present bhaiyya, TBH, by far the best video ever watched on these topics❤❤ absolutely loving the way u mould us to solve any problem. You are a gem 💎
@GAURAVKUMAR-rt4gd7 ай бұрын
most occurrence char wala question me sbse phle string sort krke fir while loop lagake conditional statement use krke ho jayega....... NEW APPROACH
@017_indrasen9 Жыл бұрын
At 1:18:00 we can use "str.replace(i, 1, "@40");" for any space occurence
@vishalrajiwade696410 ай бұрын
03:22 Understanding and using character arrays and strings 13:35 Understanding character arrays and string manipulation 17:32 Understanding char arrays, strings, and solving LeetCode questions. 23:56 Understanding different types of character arrays and their applications 26:49 Understanding the process of subscribing and subscribing to a channel. 36:03 Understanding character arrays and string manipulation 40:24 Understanding char arrays, strings and solving LeetCode questions 46:58 Discussion on subscriptions and useful content 51:29 Understanding char arrays, strings, and LeetCode problem-solving. 58:25 Usage of char arrays and strings in coding. 1:01:17 Understanding char arrays, strings, and solving LeetCode questions 1:07:21 Understanding char arrays and strings in C++ 1:11:00 Understanding char arrays and strings 1:16:46 Understanding the solution for specific lengths and balancing 1:20:34 Understanding char arrays, strings, and LeetCode questions. 1:27:01 Understanding char arrays and strings in C++ 1:30:15 Understanding array operations and processing strings 1:35:53 Understanding and solving char arrays and strings 1:38:25 Understanding Char Arrays and Strings 1:44:05 Cleaning and maintenance of char arrays and strings 1:47:43 Understanding account management and settings 1:52:40 Understanding the size of a tractor
@siddhishitole39863 жыл бұрын
Thank you sir for effort and time ur taking out for us.. Motivating us to do more ✨🙂
@abdxlive5 ай бұрын
52:00 TBC Insha-Allah | Thanks Bhaiya Ji ❤️
@Name-f9v1n2 ай бұрын
It's 1:40 Am 6/10/24 , Alhamdulillah ❤ i completed this long and tough lecture.
@AjaySharma-gg8dv2 ай бұрын
bhai mera aaj hua , ek saval tha bhai ki apna college walo ka bhi dsa aa gaya hai u tube per , vo follow karu ya yahi
@52hsrah3 ай бұрын
String Handling Input: std::string s = "ab\0cd\0"; Behavior: The string will contain all characters, including the null terminators. The length of the string will be 5 (including the null characters). Printing the entire string will show all characters. Size and Length: s.size() will return 5 s.length() will also return 5 Iteration: Iterating through the string will include all characters, including nulls. Substring Extraction: Extracting substrings will preserve null characters. Char Array Handling Input: char ca[] = "ab\0cd\0"; Behavior: The char array will be terminated at the first null character. Only "ab" will be considered part of the string. The second "\0" and "cd" will be ignored. Size and Length: strlen(ca) will return 2 sizeof(ca) will return the total size of the array (likely 6) Iteration: Standard string functions like printf("%s", ca) will stop at the first null character. Substring Extraction: Attempting to extract substrings beyond the first null will result in undefined behavior. Key Differences Null Terminator Handling: Strings can contain null characters; char arrays treat them as terminators. Length Calculation: Strings calculate length including nulls; char arrays stop at the first null. Memory Usage: Strings allocate memory dynamically; char arrays have fixed size. Flexibility: Strings offer more flexibility in handling special characters. Compatibility: Char arrays are compatible with C-style string functions; strings require C++ methods.
@chandrabhanthakkangar8380 Жыл бұрын
Maine puri video dekhi hai bhaiya.. Sachme bhaiya dilse kaha raha hu pahle muze dsa problems ko tackle karna bahot hard lagta tha jabse aapka KZbin channel dsa ka series follow kiya na bhaiya sachme ekdam tagda aatama-vishvas bahot jyada high ho raha hai.. Thank for such awesome series bhaiya ❤.. Mai abtak 22 lecture dekh liye hai bhaiya...
@vanshmehan86342 жыл бұрын
❤🔥Easy Code for 01:23:30 - Permutation in String ❤🔥 #include using namespace std; #include #include bool checkPer(string s1, string s2){ while(s1.length()!=0 && s1.find(s2)
@ankushraj95832 жыл бұрын
does it work? where is it calculating for all permutations. from what I am understanding it's just checking from original order and a reverse.
@vanshmehan86342 жыл бұрын
@Ankush Raj yess you r right!! I understood the question wrong!! Thanks buddy👍🏻
@smarthgarg63052 жыл бұрын
very well explained ,Ik I'm bit late but loving the videos till now. Each concept is cyrstal clear till now.
@Abhinav_2060 Жыл бұрын
In last question of the video dont forget to add chars.erase(chars.begin()+ansIndex,chars.end()); return chars.size(); at the end or the existing elements of the chars array will also be there ,leading to incorrect ans.
@umangpatel4202Ай бұрын
1:10:29 bhaiya agar is code mein jo ki maximum occuring character ka hai. agar ismein input string "zac" ya esi ho jis mein koi character repeat nahi ho raha tab bhi is code mein jo character alphabetically pehle aa raha ho vo print hoga jab ki sabki occurence 1 hai to ese case mein kuch bhi print nahi hona chahiye. to iss ke liye return 'a' +ans; ke pehle aap ye if statement le sakte hai if(ans
@tanmayghosh83112 жыл бұрын
1:17:39 str.replace(index, 1, "@40 "); this will help
@shubhamlingwal50542 жыл бұрын
it willl not work we need still extra space in string .Can you please share soln if it worked .
@devanshusahoo2 жыл бұрын
Dil se accha laga yeh video. thank you very much.
@sudhanshuprasad85082 жыл бұрын
homework code given at 42:39 #include using namespace std; string reverse(string x){ int i = 0; int j = x.length() - 1; while(i
@garvmit2 жыл бұрын
thnx
@kathanadalaja4990 Жыл бұрын
V.push_back(reverse(x)) durai baar kyu likha bhai
@1hokage8 Жыл бұрын
in the question it was mentioned without allocating extra space we need to do.
@RohitRana-tz2lr3 жыл бұрын
Bhut mja aara h bhaiya aapse different different question ko solve krne ki approach ko samjne m... puri video dekhi bhaiya.. keep doing it bhaiya... Thanks for everything
@muneebjaved39402 жыл бұрын
1:17:34 string replaceSpaces(string &str){ for(int i = 0; i < str.length();i++){ if(str[i]== ' '){ str.replace(i,1,"@40"); } } return str; }
@snehagupta347910 ай бұрын
saw the full video in 2 days bhaiya and reffered this link to all my friends !! best video i have seen!!
@kirtigupta99833 жыл бұрын
01:17:12 QUES: Replace space in the original string.... SOL: string replaceSpaces(string &str){ // Write your code here. string s="@40"; for(int i=0;i
@DominiK037 Жыл бұрын
sir told us not to use second string and you created this xd | string s= "@40" | Instead it's just | str.replace(i, 1, "@40"); | inside if loop :)
@8BitGamerYT110 ай бұрын
@@DominiK037Not just that, s[i] is supposed to be a character right? We can't place a string in that position. Canw e?
@rishikumar-uf7tu5 ай бұрын
47:32 GOOD PALINDROME QUESTION REFER FOR FUTURE ALSO TIMESTAMP IN PERSONAL PPT 1:24:00 permutation in string also included in personal ppt
@KR1SH055 ай бұрын
send that ppt :D
@adityasinghrawat66642 ай бұрын
me too please
@seemantkamlapuri362 жыл бұрын
Salute your hard work sir 👍... & Thanks for the easiest explanation 🙏
@aryanmahendru7728 ай бұрын
literally cried at 1:20:23 it took .5hr to me to get the approach and bhaiya,you did with these, in build functions in just 3-4 lines!😫😩
@vanshtyagii3498Ай бұрын
string replaceSpaces(string &str) { int spaceCount = 0; // Count Number of Spaces for(int i = 0; i < str.size(); i++){ if(str[i] == ' '){ spaceCount = spaceCount + 1; } } // Store thr current length of the string in a variable. int len = str.size(); // Find the new length. int newLength; newLength = len + (spaceCount * 2); // Resize the current string. str.resize(newLength); // Index to end of string. int index = newLength - 1; // Fill string from end. for(int k = len - 1 ; k >= 0; k--){ if(str[k] == ' '){ str[index] = '0'; str[index - 1] = '4'; str[index - 2] = '@'; index = index - 3; } else{ str[index] = str[k]; index = index - 1; } } // Return string. return str;
@abhiinavv.pullss27 күн бұрын
good approach
@swatisinha50373 жыл бұрын
this man is a gem, your explanations are soo good!
@vijaysaharan33822 жыл бұрын
1:17:53 string rep = "@40"; for(int i=0 ; i
@bhawargujral35742 жыл бұрын
Always providing quality content 👌
@infernogamer522 жыл бұрын
Key Differences Between Character Array and String ------------------------------------------------------------------------------------ 1. A character array is a collection of variables which are of character datatype. String is a class that is instantiated to declare strings. 2. Using index value you can access a character from a character array. On the other hand, if you want to access a particular character in a string, you can access it by function string’s_name.charAt(index). 3. As an array is not a datatype similarly a character also is not a datatype. On the other hand, String being a class act as a reference type hence, it can be said String is a data type. 4. You can not apply any operator on a character array whereas, you can apply operators on String. 5. Being an array character array has a fixed length and its boundaries can be easily overrun. Where String does not have any boundaries. 6. Array elements are stored in a contiguous memory location hence that can be accessed faster than string variable.
@ayushsoni78232 жыл бұрын
18:24 Length of string We can directly print 'i' instead of creating count variable
@741ibrahim22 жыл бұрын
i+1
@themindtreatment Жыл бұрын
the best thing about this course is it covers wide range of topics which is helpfull for beginners as well as advance programe
@kishanprajapati33272 жыл бұрын
57:42 question 6 #include #include using namespace std; int main(){ //string s ="s","k","y"," ","t","h","e"; // char s[8] = {'s','k','y','\0','t','h','e','\0'}; string st = " sky the is blue "; int s = 0; int e = st.length()-1; while(s
@sureshmakwana87092 жыл бұрын
But this leetcode question got locked for Premium users now 🥲
@im_sks2 жыл бұрын
wrong in o/p->we want "yks eht si eulb"
@kishanprajapati33272 жыл бұрын
@@im_sks yes but if you don't take space at the beginning and the ending it will give the wrong answer.
@aizajsamani88943 жыл бұрын
Kamaal karte hain bhaiya ji, itna bada video😰...Khair dekhna toh padega hi😁 Thank You bhaiya ji🙂
@GauravSharma-ze4cu Жыл бұрын
55:27 question 5 is little different btw great video
@rohanmahajan6129 Жыл бұрын
Bhaiya time to laga puri video dekhne m, but truely mazza bht aaya, and specially jo questions kr k confidence mila...🔥🔥🔥🔥, thank you bhaiya..!!!
@devvarshney11442 жыл бұрын
Inplace solution of question "replace an space with @40" string replaceSpaces(string &str){ int l = str.length(); int i = 0; while(str[i] != '\0') { if(str[i] == ' ') { str = str.substr(0,i)+"@40"+str.substr(i+1,str.length()-1); } i++; } return str; }
@kenguvaabhinav2200 Жыл бұрын
it should be substr(i+1,s.length()) as the end index is not inclusive, isn't it?
@akashpatel-jp4gh5 ай бұрын
Reverse words in a string we have to Change the position of word instead of reverse the word Example: "my name is love" Incorrect - "ym eman si evol" Correct - "love is name my" Like you helpful ❤
At 42:46 Question Valid Palindrome my approach is a lot more easier and i wuld say the best: class Solution { public: char tolowercase(char ch){ if(ch>='a' && ch
@rehanhussan2 жыл бұрын
Sir Your teach us Like a Brother, Quality content and I follow all your words.
@arnobbaiga3092 жыл бұрын
bro 1:47:28 why he did char[ansindex++]?
@BombSquadHindiTipsTricks Жыл бұрын
54:56 the question which Love Babbar bhaiyya is talking about is reverse word in a string III not II so guys search question no.557 in leetcode
Quality Content ++ ❤❤ Thank you sir for effort and time ur taking out for us 🔥🔥
@gurtegsinghsohi411 Жыл бұрын
Can you provide answer of 57:15
@usernamewhatsoever45572 жыл бұрын
Bhaiya aaj pehla question leetcode pe khud se solve kra, bahut garv mehsoos ho rha hai Aapke videos ne bohot help kari
@karthik53r352 жыл бұрын
1:39:08 Homework with Runtime: 85 ms, faster than 30.06% of C++ online submissions for Remove All Adjacent Duplicates In String. Memory Usage: 9.7 MB, less than 96.17% of C++ online submissions for Remove All Adjacent Duplicates In String. string removeDuplicates(string s) { int i=0,j=1; while(i0){ if(s[i]==s[j]){ while((i>0 && j
@parthhh35892 жыл бұрын
time complexity kya hai?
@mradultiwari9864 Жыл бұрын
@@parthhh3589 O(n square)
@mradultiwari9864 Жыл бұрын
string removeDuplicates(string s) { int i=0; while(i
@satyam8334 Жыл бұрын
@@mradultiwari9864 Try this:- class Solution { public: string removeDuplicates(string s) { int sl=s.size(); int i=0; while( i0) i-- ; sl=sl-2; } else{ i++; } } return s; } };
@mradultiwari9864 Жыл бұрын
@@satyam8334 thanks
@manashvardhan9965 Жыл бұрын
bhaiya is video ko ek hafte se padh rha hu samjh samjh kar😎 thankU
@jayeshmandavkar98373 жыл бұрын
Attendance Marked Bhayya try to make videos till 1hr only because HW + attendance + Implementation is going beyond 3.5hrs going great in this course Hope we will be getting videos on daily basis...!! Thank You so much...
for adjacent duplicates: class Solution { public: string removeDuplicates(string s) { int j=0; int i=0; while(i+1
@sonicboom66352 жыл бұрын
Thank you bro sharing this code
@raushansingh86182 жыл бұрын
bro can u explain while(i+1
@aviralkumarsingh6392 жыл бұрын
Ye lecture mera upr se gya 😵💫
@sureshbhardwaj99983 жыл бұрын
Log kehte the aapko coding nhi aati roadmap dete ho. Job se nikal diya.. Kya tamacha maara sbke mooh pr aapne..well done Poori duniya me itna detailed content nahi h filhal
@hitececourses40622 жыл бұрын
Replace Spaces: inplace solution string replaceSpaces(string &str){ for(int i=0; i
@prajjwalsingh20092 жыл бұрын
BRUH TOO GOOD
@visheshkumar152 жыл бұрын
why 32 can u explain me plz
@prajjwalsingh20092 жыл бұрын
@@visheshkumar15 32 coz its the ascii value for space
@parthdeshwal441910 ай бұрын
9 hrs lage khud question try karte hue is video ko dekhne me
@NamanSingh_14211 ай бұрын
at 1:22:00,suppose there is no such part remaining in the string now,then .find() will return -1 and hence the condition becomes -1
@sunpreetsingh37972 жыл бұрын
Best solution to Remove all Adjacent Duplicates 1:39:00 void removeAdjacentDuplicates(string &str) { int i=0; while(str[i] != '\0') // OR we can use -> while( i
@gulmuazzamfaize60202 жыл бұрын
It's not working
@harmanjeetsingh49732 жыл бұрын
@@gulmuazzamfaize6020 int i=0; while(i>=0&&s[i]!='\0'){ if(s[i]==s[i+1]){ s.erase(i,2); if(i!=0){ i--; } } else{ i++; } } return s; This will work. he missed when i=0; then i will be decremented to -1, so code was showing compilation error
@AyanSohail-oq7vk2 ай бұрын
for Maximum occurring character solved using mapping with time complexity of O(n) and space complexity is O(1) which is the most optimal solution: the code is down below --> class Solution { public: char toLower(char ch){ if(ch>='A' && chmax){ max = it.second; maxchar = it.first; } //to handle characters lexiographically else if( it.second == max && it.first< maxchar){ maxchar = it.first;// s= 2 , t=2 , e=2; } } return maxchar; } hope this helps : -) .