Тёмный

13.2 Strings Challenges | C++ Placement Course 

Apna College
Подписаться 6 млн
Просмотров 323 тыс.
50% 1

Опубликовано:

 

25 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 425   
@ApnaCollegeOfficial
@ApnaCollegeOfficial 4 года назад
A very Happy Diwali to all of you. Love you all 3000 ❤️
@negasonicteenagewarhead
@negasonicteenagewarhead 4 года назад
Happy diwali aman bhaiya and whole team❤️❤️
@riteshgupta7489
@riteshgupta7489 4 года назад
Happy Diwali 🪔
@mayankkumartiwari2052
@mayankkumartiwari2052 4 года назад
Happy Diwali Bhaiya
@AmanYadav-fe1tk
@AmanYadav-fe1tk 4 года назад
Happy diwali sir aapko bhi
@smitaseal1689
@smitaseal1689 4 года назад
Happy Diwali 🌟🌟🌟🌟
@sawoodahmed9396
@sawoodahmed9396 4 года назад
Thank you so much for your course I couldn't buy any paid course and thought that I couldn't learn all the coding and ds algo but with your course iam learning all of them thank you so much ❤️❤️👍👍👍
@ryzenae
@ryzenae 3 года назад
7:19 Alternate way, we will sort our string(asc. order) then we'll compare the two consecutive charaters if true the count = count + 1 or else count = 1, initially our count is 1 st = 0; en = 1, for checking the consecutive two elements, if the two elements are same then we'll increment both st and en by 1 for checking the next if the both elements are same then len++ or else len = 1 consecutive elements here is the code #include #include #include using namespace std; int main(){ string str; cin >> str; int st=0; int en=1; int len=1; int mxLen=INT_MIN; sort(str.begin(),str.end()); cout
@yashvats824
@yashvats824 3 года назад
Awesome , but this code isn't efficient as time complexity is O(n^2)
@tedbundy8712
@tedbundy8712 2 года назад
@@yashvats824 but how?
@parvahuja7618
@parvahuja7618 2 года назад
bro time complexity high hai
@ryzenae
@ryzenae 2 года назад
@@parvahuja7618 yes bro... Thanks..
@sachinkashi
@sachinkashi Год назад
@@yashvats824 but time complexity is O(n) for his solution? I didn't got how it's O(n^2) pls explain
@anubhavsharma6789
@anubhavsharma6789 3 года назад
maximum no occuring in the string string s="apnaacollege"; int curr=0; int mex=0; for (int i = 0; i < s.length(); i++) {curr=0; for ( int j=0; j
@insaneclutchesyt948
@insaneclutchesyt948 2 года назад
we can also do the last question by sorting the string and then iterate through it.... #include #include #include using namespace std; int main(){ string s1="abcaacbade"; sort(s1.begin(),s1.end()); int freq=1; int maxf=0; for(int i=0;i
@bestvideos8473
@bestvideos8473 2 года назад
Thank you so much, but why you took freq as 1 in start?
@NinjaDevPlays
@NinjaDevPlays 2 года назад
@@bestvideos8473 you can star from anywhere
@sajidbhat7418
@sajidbhat7418 Год назад
i think we have to assign 1 to freq in the else condition
@harshakarthik9966
@harshakarthik9966 Год назад
@bestvideos8473 one letter is coming atleast we cannot say zero as letters are there. Though every letter is different ,max frequency is 1.So ,intialise with 1.
@shambhuyadav_
@shambhuyadav_ 4 месяца назад
Yeah, but it will not print the letter with maxfrequency.
@soumyagupta4273
@soumyagupta4273 2 года назад
Additional question.. //compression of string //remove the repeating consecutive characters. int main() { string s; cin>>s; for (int i = 1; i < s.size(); i++) { if (s[i]==s[i-1]) { s.erase(i-1,1); --i; } } cout
@HimanshuSharma-ql4gm
@HimanshuSharma-ql4gm 2 года назад
Hey can you plz elaborate why you had used --i; in the if condition
@Abhishek-or9bd
@Abhishek-or9bd 3 года назад
Legends say he is still saying " lets save it, run it" Btw you explain very well. thank you
@prajjavalsrivastsva7037
@prajjavalsrivastsva7037 3 года назад
Videos like this, in which you teach us how to solve a problem are very helpful....Thanks a lot bhaiya!!
@yashpriyadeepkatta8823
@yashpriyadeepkatta8823 4 года назад
0:00 - Ads 3:54 - Inbuilt function ( Transform func.) 5:54 - form the biggest number from the numeric string 7:22 - maximum number occuring in string(maximum frequent character/number)
@omkumarsaini692
@omkumarsaini692 2 года назад
0:00 zomato ad 0:00 dominos ad
@yashpriyadeepkatta8823
@yashpriyadeepkatta8823 2 года назад
@@omkumarsaini692 🤣 will do bro!
@shreyaschavhan5522
@shreyaschavhan5522 3 года назад
Q1. Convert to UPPER or lower: 0:10 Shortcut - transform() function : 4:00 Q2. Form the biggest number from the numeric string : 5:48 Doubt - Why do we use greater()? What does it mean? Q3. Output Frequency : 7:15
@prathamrana8433
@prathamrana8433 3 года назад
We use greater int beacuse of the decreasing order agr number decresing order mai aenge toh automatically number greater form hga
@Niketh.M
@Niketh.M 3 года назад
@@prathamrana8433 whats for increasing order??
@niveshnegi2421
@niveshnegi2421 3 года назад
@@Niketh.M less()
@pradeepthipalaparthi
@pradeepthipalaparthi Год назад
@@niveshnegi2421 or we can just use sort (by default it will be in increasing order na)
@BUNNY-yh2wg
@BUNNY-yh2wg 9 месяцев назад
Jinhone soch liya bohot badiya . aur jo nahi soch paye, unke liye to hum he hi 😉
@AnkitSharma-jf9fg
@AnkitSharma-jf9fg 4 года назад
u can initialize whole array with 0 by just writing freq[n] = {0};
@anshulyadav1060
@anshulyadav1060 3 года назад
value intialize given in the ques. that are the no. of alphabets, else you can put freq[n] = {0}; but al last u have make dession driver in which u have to place value of n ao else you cannot input value in the output menu.
@anshulyadav1060
@anshulyadav1060 3 года назад
first leran about the frequency it cannot be zero if it will zero you acesss anything
@AnkitSharma-jf9fg
@AnkitSharma-jf9fg 3 года назад
@@anshulyadav1060 bro or sis i am just telling a shorter syntax of wiriting something nothing else. I think u missunderstood 😀
@anandoganiya9070
@anandoganiya9070 3 года назад
@@AnkitSharma-jf9fg yes u can do that too
@harshbhansali1327
@harshbhansali1327 3 года назад
waise C me nahi hota?
@factfusion_shorts_
@factfusion_shorts_ 2 года назад
Easy method is #include #include #include Void main() { Char str[ ]="rahul"; Clrscr(); Cout
@mrdark2734
@mrdark2734 2 года назад
This doesn't work We have to run loop for this.
@factfusion_shorts_
@factfusion_shorts_ 2 года назад
@@mrdark2734 bhai tujhe bnana hee nhi aya program
@BackToBoi
@BackToBoi 3 года назад
I have think an another way of doing the first question and I think that it's the easiest way to do this question at this level --------------- #include using namespace std; int main() { string s1; cin>>s1; for(int i=0; i
@VishalKumar-nh8jo
@VishalKumar-nh8jo Год назад
ye logic ni h ye har jagah use ni hoga
@kunalthapliyal3914
@kunalthapliyal3914 4 года назад
Thank you...i wonder .. From where does such intense source of motivation to help others comes in you
@gto433
@gto433 3 года назад
Why do you not have it?
@yashthakre9150
@yashthakre9150 3 года назад
3 rd question solution is very much confusing 😓😭
@kritarthabikramshah3210
@kritarthabikramshah3210 2 года назад
Its all about ASCII .
@iamaryasharma
@iamaryasharma 2 года назад
😇😇😇Jee
@Vikkuu15
@Vikkuu15 Год назад
Normally sort it and use maxcount and currcount
@Vikkuu15
@Vikkuu15 Год назад
Or u can use hash map
@harshakarthik9966
@harshakarthik9966 Год назад
Arey bhai sort kardo first pura order me aa jayega ,sort ke leye ekh he line chaheye .Next int count,maxi=1; for (int i=0;i
@manirathod144
@manirathod144 Год назад
for last question: #include using namespace std; int main(){ int t; cin>>t; while(t--){ string s; cin>>s; int freq[26]={0}; int max=0;char result; for(int i=0;i
@kishorchintalchere
@kishorchintalchere 3 года назад
Mast logic lagaya last question me😍🔥
@yash9725
@yash9725 3 года назад
Q2) This is the answer of Q2, using for loop, and the STL as well: - #include #include #include using namespace std; int main() { string a; getline (cin, a); // for (int i = 0; i < a.length(); i++) // { // for (int j = i + 1; j < a.length(); j++) // { // if (a[i] < a[j]) // { // int temp = a[i]; // a[i] = a[j]; // a[j] = temp; // } // } // } USE THE ABOVE CODE OR THE CODE BELOW! BOTH FUNCTION IN THE EXACT SAME MANNER! sort (a.begin(), a.end(), greater()); // this sorts the string in a descending order!! cout
@vaibhavlokhande2097
@vaibhavlokhande2097 3 года назад
if (a[i] > a[j])
@sahilrao5677
@sahilrao5677 2 года назад
is this code time complexity nlogn or n^2
@shreyashjoshi8489
@shreyashjoshi8489 2 года назад
For those wondering what will we use for generating the smallest number: Just use less() in place of greater()
@iitiansubham
@iitiansubham 2 года назад
@@shreyashjoshi8489 no need to us less() .... since sorting always work in ascending order by default.
@rameshmalhotra9525
@rameshmalhotra9525 2 года назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-5FsIa4Mp3ho.html
@TheAbhidugar
@TheAbhidugar 3 года назад
greater ? ab yeh kaha se aya, kya hota hai. please pura explain karein.
@janvimyadventures1310
@janvimyadventures1310 3 года назад
Hmari Zindagi ka dukh vector bhaiya
@Niketh.M
@Niketh.M 3 года назад
Did you get to know???
@TheAbhidugar
@TheAbhidugar 3 года назад
@@Niketh.M no, sorry. i have moved to java
@Niketh.M
@Niketh.M 3 года назад
@@TheAbhidugar why java bro??? What made you change to java??
@TheAbhidugar
@TheAbhidugar 3 года назад
@@Niketh.M actually I wanted to do android development. So that's why. C/C++ were languages I started because I wanted to know what is programming. Once got comfortable with loops and started understanding oops then I moved to Java.
@rajiv-59
@rajiv-59 2 года назад
The last question will not work if capital characters and small characters are in mixture so the general solution is..,......for question no. 3rd #include using namespace std; int main() { #ifndef ONLINE_JUDGE freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); #endif string str; getline(cin,str); int mx=INT_MIN; int length=str.size(); int count; char st; for(int i=0;i
@pwno1
@pwno1 4 года назад
Happy Diwali Bhaiya and to all teachers of Apni Kaksha🎉🎉🎂🎊
@Sunil_13_7
@Sunil_13_7 3 года назад
Wap to accept a string from user and return a word from string which have greatest number of repeated character..also prinnt the character.. Ex input: hello assesment team Output:Assesment Char :S Count 3 Can u solve this???? I will wait for solution
@ashutoshprusty3099
@ashutoshprusty3099 2 года назад
In the description of the video PDF notes links are there , in some videos i was opened it there was not any PDF and showing -Sorry, the file you have requested does not exist. Please reply any one who face this type of issues and tell what is the solution.
@webclips1567
@webclips1567 2 года назад
Me
@stardust857
@stardust857 2 года назад
#include; #include; using namespace std; int main() { string s; cin>>s; int len=s.length();int currlen=0;int maxlen=0; for(int i=0;i
@shashwattopre9672
@shashwattopre9672 3 года назад
string st="aavbdjoaara"; // int count=1; // sort(st.begin(),st.end()); // for(int i=0;i
@mohammedmaseehuddin4805
@mohammedmaseehuddin4805 3 года назад
actually its not. The time complexity of sort func is O(nlogn) which makes total time complexity as O(nlogn + n) whereas the the complexity of code in the video is O(3n) which is more efficient. Thank for the idea though
@mohammedmaseehuddin4805
@mohammedmaseehuddin4805 3 года назад
we can make it O(2n) by removing the third loop and doing the operations we are doing in it in the second loop itself.
@shashwattopre9672
@shashwattopre9672 3 года назад
oh thanks for the information:)
@h2oarindam789
@h2oarindam789 3 года назад
IN MAXIMUM REPEATING LETTER QUESTION, WE CAN FIRST SORT THE STRING THEN FIND THE LONGEST CONTIGOUS SUBSTRING WHICH WAS DISSCUSED IN A PREVIOUS VIDEO OF ARRAY;
@amritrijal6967
@amritrijal6967 3 года назад
@@codeWith.Sam_ #include #include #include #include using namespace std; int main() { string s = "aaabbccdddd"; sort(s.begin(), s.end()); int count = 1; int max_str = INT_MIN; int ch; for (int i = 0; i < s.length(); i++) { if (s[i] == s[i + 1]) { count++; if(count>max_str){ max_str=count; ch=i; } } else { count=1; } } cout
@yashvats824
@yashvats824 3 года назад
Awesome , but this code won't be efficient as time complexity will be O(n^2)
@rameshmalhotra9525
@rameshmalhotra9525 2 года назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-5FsIa4Mp3ho.html
@jayeshshimpi1332
@jayeshshimpi1332 3 года назад
♥️ Really useful contain 😌😌 love you Aman bhaja and team ♥️
@AkashEdits-vc2gc
@AkashEdits-vc2gc 3 года назад
In first question, after convert upper case part str is totally uppercase so there is no need of if condition in convert lower case part
@hridyanshgautam7042
@hridyanshgautam7042 2 года назад
i can also do the last question by sorting the string and then iterate through it ...... #include #include #include using namespace std; int main() { string s = "abcacbadbbe"; sort(s.begin(),s.end()); cout
@pahaljain9209
@pahaljain9209 3 года назад
bery bery good teaching fan hogaye bhaiya ji ham toh
@not_sukku
@not_sukku 4 года назад
Happy diwali bhaiya❤❤
@system6468
@system6468 3 года назад
Here is very easy solution for last question in O(n) time complexity #include #include #include int main() { int a = 1, mx = INT_MIN, p; string s = "abdbcaabb"; sort(s.begin(), s.end()); for (int i = 0; i mx) { p = i; } mx = max(mx, a); } cout
@Jason-kk9de
@Jason-kk9de 3 года назад
Bhai kon se year mein ho
@arijitprasad7730
@arijitprasad7730 3 года назад
Thank you 😊 the algorithm works but you forgot to use namespace std;😁 its ok the logic is important
@a_58_arpanadhikary46
@a_58_arpanadhikary46 3 года назад
sir need some more videos on string
@harshakarthik9966
@harshakarthik9966 Год назад
We need to do in the way taught by bhaiya ,bcz if we try other method our time complexity is becoming order of stringsize ,but for bhaiya its only O(52).
@fruitnegi2170
@fruitnegi2170 9 месяцев назад
How it's O(52)?
@jiteshmeher6013
@jiteshmeher6013 4 года назад
Happy Children's Day to all of us 😀😀
@lol_iris237
@lol_iris237 3 года назад
In the last ques we could have sorted the string using sort(s.begin(), s.end()) and then get the char with the max frequency. This is my approach hope u liked it.
@GajendraSingh-lv3jw
@GajendraSingh-lv3jw 3 года назад
bro give the code pls i would like to know your approach too
@GajendraSingh-lv3jw
@GajendraSingh-lv3jw 3 года назад
lol i think i got it .. for(int i=0;i
@GajendraSingh-lv3jw
@GajendraSingh-lv3jw 3 года назад
maxAlphabet = alphabets[i]-a;
@lol_iris237
@lol_iris237 3 года назад
@@GajendraSingh-lv3jw bro like in the second ques bhaiya stated sort method to sort a string we can sort it from that then we can calculate the frequency of max
@lol_iris237
@lol_iris237 3 года назад
@@GajendraSingh-lv3jw yaa ✌️
@rashmibajaj1396
@rashmibajaj1396 2 года назад
Last Q's soln is wow!
@iasaspirant1441
@iasaspirant1441 2 года назад
thank you sir this video really helped me alot
@jitesh2639
@jitesh2639 Год назад
3rd ques had lot to learn... 😘
@pranavtiwari_yt
@pranavtiwari_yt 4 года назад
if(String.equals("you are reading this comment on 14Nov.2020")) { std::cout
@artirani3806
@artirani3806 4 года назад
Badiya😊🤟
@tapeface2863
@tapeface2863 4 года назад
Kya branch h bhai,aur konsa semester
@pranavtiwari_yt
@pranavtiwari_yt 4 года назад
@@tapeface2863 is year ki councelling me seat allot hui hai.
@tapeface2863
@tapeface2863 4 года назад
@@pranavtiwari_yt my friend is in civil 3rd sem, that's why i asked
@jithinrangani866
@jithinrangani866 4 года назад
bhaiya, using namespace std; se pura std hata sakte the
@Jay-ym2ri
@Jay-ym2ri 11 месяцев назад
string s; getline(cin,s); int arr[s.size()]; for(int i=0;i
@504_apurvakumargupta8
@504_apurvakumargupta8 3 года назад
please explain the functions more elaborately
@TheAuraa
@TheAuraa 3 года назад
Alternative solution if you dont want to use another frequency array: int main() { string s1, s2; cout
@ANSYoutube
@ANSYoutube 4 года назад
'TuhanuDiwali diyan boht both vadhaiyan'
@sumitjha3428
@sumitjha3428 2 года назад
sir you are very good at teaching in the simplest way❤️
@DesivlogbyAshish
@DesivlogbyAshish 4 года назад
Codechef ka question se related btao 😍😍🪔🪔🪔🪔🪔🪔🥋🥋🥋🤟🏻🤟🏻🤟🏻
@mehak5540
@mehak5540 4 года назад
Happy Diwali Aman bhayiya n ur whole team Thanu for everything 👍🙏🙏🙏👍👍❤️❤️❤️❤️❤️😍😘😘😘🙏🙏🙏🙏
@vaibhavpatel1260
@vaibhavpatel1260 4 года назад
Was eagerly waiting for this class🤩
@shantanusingh2039
@shantanusingh2039 2 года назад
Alternative: 1: #include #include Using namespaces std; Int main { Char mx; String s; Cin>>s; For (int i=0; i
@lokeshmehta9591
@lokeshmehta9591 3 года назад
sir maza aaya in question ko krne me or yah maza h usko me her hindustani ko dena chahta hu.
@asifiqbalsekh
@asifiqbalsekh 3 года назад
ab aisa hai vaiya ap ki coding ko samjne ke liye dubara video dekhna hota hai...lekin jab samaj mai ajata hai atab dil se awaj ata hai "arey wah bete maj kar di"....
@ashwayyonex1694
@ashwayyonex1694 2 года назад
Sound quality very poor🥲🥲🥲🥲 But, the content is awesome 👍👍👍
@rajeevsingh5453
@rajeevsingh5453 3 года назад
code for java class Rough{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s ; System.out.println("Enter the value of String"); s = sc.nextLine(); int arr[] = new int[256]; //256 is the last number in ascii table(tables which has int value of all the possible characters) int n = s.length(); for(int i=0 ; i
@perseusgaming7397
@perseusgaming7397 2 года назад
Pucha kya ?
@hemant_1213
@hemant_1213 4 года назад
Bhaiya plzz thoda aur samjha k aur ex. De k samjhaenge to ache se samjhega c++ ka course plzz thoda aur deep me explain krne ki koshish kariye ❤🙏🏻
@Your_channel363
@Your_channel363 4 года назад
Happy diwali work hard or agar jaha ho vo jagah psnd na ho to badal daalo 🔥🔥🔥❤️
@anushthakumari2393
@anushthakumari2393 3 года назад
Last code is fine but there will be error 1)if we input upper and lower case alphabet in same input 2) two or more max occurring char
@ranjitraiseceitslno.1297
@ranjitraiseceitslno.1297 3 года назад
Then first make whole string in lower case using command.
@smitaseal1689
@smitaseal1689 4 года назад
Happy Diwali 🌟🌟
@vinayaksharma7134
@vinayaksharma7134 2 года назад
Thank You Bhaiya!!....very helpful video covering good basic questions
@ashishrai5720
@ashishrai5720 2 года назад
everything is fine but in notes to convert string into lower/upercase the conditional statement is having or operator, it should be and operator as mentioned in the lecture.
@AT-we9th
@AT-we9th 2 года назад
pls send notes I cant download from the link
@mayankkumartiwari2052
@mayankkumartiwari2052 4 года назад
Happy Diwali to all of you
@ssarker9411
@ssarker9411 4 года назад
Happy Diwali #ApnaCollegeTeam 🥳🥳🥳🎉🎊
@shubhambhardwaj8894
@shubhambhardwaj8894 4 года назад
Happy diwali🕯 bhayiya Best course❤
@manthantiwari782
@manthantiwari782 4 года назад
Happy Diwali Bhaiya
@ahadaksar9223
@ahadaksar9223 Месяц назад
you should have discussed last problem in more detail.there are many points like 2nd loop where beginner will get confused
@YourLevioHok
@YourLevioHok Год назад
Thank you for the awesome video sir!. I understand clearly. Please update this video notes 😅
@mowleeshmurugan6440
@mowleeshmurugan6440 2 года назад
In Third Question A string may have multiple characters with maximum frequency so for the code in the video I hope it won't display all the characters in a string which has maximum frequency ,also I think that code won't work for alphanumeric & strings with special characters. So I wrote my code using ascii values and also using in-built function to find the the max element in a array My Solution #include "bits/stdc++.h" using namespace std; int main() { int ar[256]={0}; int n = sizeof(ar) / sizeof(ar[0]); string str; cout
@balramsharma6387
@balramsharma6387 4 года назад
Happy Diwali bade bhai and your family also
@shivammaurya3451
@shivammaurya3451 4 года назад
Thank u bhaia best explanation
@jiteshmeher6013
@jiteshmeher6013 4 года назад
Happy Diwali bhaiya and ur whole team 🙏🎉🎉 stay safe ❤️
@akshaynaphade6103
@akshaynaphade6103 4 года назад
I'm now doing if else statements practice
@aman.x
@aman.x 2 года назад
Let's save it, run it😁
@AbhishekKumar-td5zu
@AbhishekKumar-td5zu 4 года назад
Tqsm bhaiya ♥️♥️
@rambabupatidar3092
@rambabupatidar3092 3 года назад
Alternate to capitalize the string:--------> string str="kalkdjnhakjhdjfhlaj"; for( int i=0;i
@mindblow3029
@mindblow3029 3 года назад
So many inbuilt functions are being used here without much explanation How we are going to remember them we are at just beginning. It's complex one.
@AmanTheDisciple
@AmanTheDisciple 9 месяцев назад
Let's save it, run it.
@dinkarkumar02
@dinkarkumar02 2 года назад
Happy Independence day 2022 🇮🇳🇮🇳
@rajiv-59
@rajiv-59 2 года назад
For 1st question #include using namespace std; int main() { #ifndef ONLINE_JUDGE freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); #endif string str; getline(cin,str); for(int i=0;str[i]!='\0';i++) { cout
@geniussai4180
@geniussai4180 3 года назад
Sir what is ltrim and rtrim in c++ please make videos on this topic
@socialtv9743
@socialtv9743 3 года назад
My Approach For the third challenge ( Max frequency ) . Comments down if it is good (in terms of time complexity) than the following approach should in the tutorial. #include using namespace std; int main(){ int n, i, j, Max=0, counter=0 ; cout n; char arr[n+1] ; cout arr; for (i=0; i
@satyasamhita77
@satyasamhita77 3 года назад
could u plz explain the code
@DIVYANSHMISHRA08
@DIVYANSHMISHRA08 4 года назад
int freq[26] = {0}; by this way also we can initialize the array with zero right? correct me if wrong.
@nimittsingh7094
@nimittsingh7094 4 года назад
Yes you can but only while declaring the array. Instead of this u can use memset function anywhere.
@ARYANKUMAR-yc5tc
@ARYANKUMAR-yc5tc 3 года назад
Aman bhaiyya jindabad!
@mihirmall1696
@mihirmall1696 2 года назад
for question no 3 without the ascii we can solve it by first sorting string and then taking the element which has highest frequency #include using namespace std; int main() { string s, m, n; int count = 0, c_max = 0; cin >> s; n = s[0]; sort(s.begin(), s.end()); cout
@itsmepiyushsaha
@itsmepiyushsaha 4 года назад
Please make the explanations are a bit more elaborate...
@ankushrishav
@ankushrishav 3 года назад
not talking about others videos but this one seems to be elaborate enough
@ajaykiran6
@ajaykiran6 3 года назад
ha bhaiya vahi hai...daat kyu rahe ho 6:23 XD dhannyavaaad.
@anujeetkunturkar780
@anujeetkunturkar780 3 года назад
Bhai ye toh mast practise kar raha hai buss!! explain kon karega??
@pranjalbajpai156
@pranjalbajpai156 3 года назад
karat karat abhyas te janmat hoye sujan rasri aavat jat te sil par pade nishan
@ajaypalsingh6771
@ajaypalsingh6771 3 года назад
Axhha laga.
@ajaypalsingh6771
@ajaypalsingh6771 3 года назад
Accha laga
@Krishnaaa34
@Krishnaaa34 4 года назад
Legend read comment first😈
@sahilsawal
@sahilsawal 4 года назад
Thank you Sir🙏👏👍 Well Explained Have A Safe & Happy Diwali 🔥🎉🎊😇😊
@unemployedcse3514
@unemployedcse3514 11 месяцев назад
Awesome ❤
@khajafazalkhan7516
@khajafazalkhan7516 4 года назад
Late night ko bhi active hai.....bhaiya....🤗👏✌
@HellshotGaming
@HellshotGaming Год назад
I couldn't understand the last code properly, sir explain in more detail.
@cm-b-26-prathameshpawar68
@cm-b-26-prathameshpawar68 2 года назад
// Find most frequent Character void MostFrequentChar(string str){ int maxim = INT_MIN; char maxChar; for (int i = 0; i < str.size(); i++) { int currMax = 0; for (int j = 0; j < str.size(); j++) { if (str[i] == str[j]) { currMax++; } } if (currMax > maxim) { maxim = currMax; maxChar = str[i]; } } cout
@srajansohani9772
@srajansohani9772 2 года назад
Q1. #include #include using namespace std; int main() { string S; cin>>S; for(int i = 0; i < S.size(); i++){ for(int j = i + 1; j < S.size(); j++){ if(S[i] < S[j]){ int temp = S[j]; S[j] = S[i]; S[i] = temp; } } } cout
@yourbrother1447
@yourbrother1447 3 года назад
In Last question if 2 different character have max frequency then output is only one according to code that sir has written Plz someone help me to write complete code
@v_singh2001
@v_singh2001 3 года назад
For sorting the string in increasing order instead of greater() what we need to use
@AdityaKumar-pp4xw
@AdityaKumar-pp4xw 3 года назад
sorting by itself is done in ascending order
@shubhamkale735
@shubhamkale735 3 года назад
just remove the greater() you will get the sorted string in increasing order
@unknowinglyanonymous2729
@unknowinglyanonymous2729 4 года назад
Not saying anything controversial but this shows the hollowness of us , Indian student , It seems that our resolve to code changes as far we go from bhaiya's motivational video . Everyone was hyped up now no.s are dying tho hope Aman sir continues ! Others will soon comment after 2-3 yrs hamien kisi ne bataaya hi nahi !
@manansinghal5634
@manansinghal5634 3 года назад
ANS 1. IN A SIMPLER WAY #include #include using namespace std; int main() { string a; cin>>a; for(int i=0;i
@akshaynaphade6103
@akshaynaphade6103 4 года назад
Thanks Aman bhaiya and too all your faculty for making this Great course