aap jo story batate ho to lagta he bhai coding to me bhi kar sakta hu or bahot had tar to problme khud hi solve kar pata hu love you sir
@aws_handles11 ай бұрын
I get relaxed when I see you already have a video on youtube for a problem.
@amanisdreaming39149 ай бұрын
lol same
@aninima013 ай бұрын
same xD
@AdityaSharma-sf1yh Жыл бұрын
You are genius, you don't know but you have explained it perfectly and far better than other KZbin tutors. Thank you so much!
@codestorywithMIK Жыл бұрын
Means a lot to me. Thank you so much 🙏😇
@FanIQQuiz11 ай бұрын
💯
@rachitaa._26 күн бұрын
Solved this using priority queue somehow(like solving a puzzle) , but still couldn't get how it was working, came here to actually know . I knew I would be satisfied with only your explanation of the question.
@hrithikrudra42922 жыл бұрын
Amazing brother....Keep uploading such wow content..
@codestorywithMIK2 жыл бұрын
Thanks a lot Hrithik ❤️❤️❤️
@udaytewary38092 жыл бұрын
Really thankyou bhaiya for making it so easy to understand and also learn new things about comparator from you
@codestorywithMIK2 жыл бұрын
I am so glad to hear that Uday ❤️❤️❤️
@priyamittal830210 ай бұрын
Finally understood this concept. thanks a lot!
@Ankitkumar-fz3kc11 ай бұрын
Thanks, I solved it by myself still came here to learn something new and learnt something thanks.
@codestorywithMIK11 ай бұрын
So glad to know ❤️❤️🙏🙏 Always note down the things which you are learning in a note book, or note it down somewhere so that you can revisit them later
@Ankitkumar-fz3kc11 ай бұрын
@@codestorywithMIK sir how to take notes and how to revise can you please share some insight regarding this.
@FifthArima11 ай бұрын
@@Ankitkumar-fz3kc had the same doubt. @codestorywithmik pls share your inputs
@codestorywithMIK11 ай бұрын
For taking notes, What I did was note the important points on a Notebook earlier. But I wanted to access it anywhere so I started to make notes online (google doc etc) so that I can access it online from anywhere. Make. Google doc dedicated to every topic and keep the notes in those. Keep revisiting them time to time
@souravjoshi22932 жыл бұрын
Thanks a lot man. simple and crystal clear
@souradeepghosh988811 ай бұрын
Nice explanation bhaiya
@wearevacationuncoverers Жыл бұрын
Keep uploading such amazing contents.
@saumyasrivastava53902 жыл бұрын
Please upload the PQ solution as well. I implemented this but I am unable to think in that direction
@souravjoshi22932 жыл бұрын
Me too. It would be great to have a PQ solution as well for this from you @Interview_DS_Algo Thanks in advance
@codestorywithMIK2 жыл бұрын
Sure. I am on it. Give me sometime. I will upload it today only. Thanks again for your question and watching my videos
@codestorywithMIK2 жыл бұрын
Uploaded the Heap(PQ) approach Link :kzbin.info/www/bejne/fqimipRnlJepobc
@aws_handles11 ай бұрын
Thanks a lot@@codestorywithMIK
@FanIQQuiz11 ай бұрын
@@codestorywithMIK I was looking for this. Thank you
@theOmKumar11 ай бұрын
I solved it like this. string frequencySort(string s) { string ans; int freq[128] = {0}; for(int i = 0; i < s.size(); i++){ freq[s[i]]++; } map m; for(int i = 0; i < 128; i++){ m[ freq[i] ] += string(freq[i], (char)i); } for(auto it = m.rbegin(); it != m.rend(); it++){ ans += it->second; } return ans; }
@divyanshualiwal5 ай бұрын
Awsm explanation !
@varunsheth10032 жыл бұрын
Amazing brother...
@codestorywithMIK2 жыл бұрын
Thanks a lot Varun ❤️❤️❤️
@gauravbanerjee289811 ай бұрын
Thanks a lot bhaiya ❤❤
@ShubhiSrivastava-dc6zk Жыл бұрын
is code ki space complexity or time complexity explain kr dijiye plz plz
@DevOpskagyaan11 ай бұрын
Done ❤️
@rajeevkumarsingh87192 жыл бұрын
i m confused that how the pair get stored in vector can anyone help. line 9-11
@codestorywithMIK2 жыл бұрын
Hi Rajeev, let's look at an example to understand this. Suppose we have example : "tree" Now let's populate : vector vec; i = 0, 't', we don't have 't' populated in vector as of now. vec = { {'t', 1}} i = 1, 'r', we don't have 'r' populated in vector as of now. vec = { {'t', 1}, {'r', 1}} i = 2, 'e', we don't have 'e' populated in vector as of now. vec = { {'t', 1}, {'r', 1}, {'e', 1}} Now, for i = 3, 'e', we already have {'e', 1} in our vector So, take out frequency of 'e' already present in vector : i.e. freq = 1 int freq = 1 Now, we add 1 more to it, because we have got another 'e' at index = 3 and then insert it back to vec (updated value) vec = { {'t', 1}, {'r', 1}, {'e', 2}} Hope I was able to clear now. Thank you for watching
@rajeevkumarsingh87192 жыл бұрын
Yeah very helpful
@codestorywithMIK2 жыл бұрын
Glad to know that Rajeev. Thanks
@factshubonly11 ай бұрын
ordered map already sorted hota hai usse nhi kar sakte kya?
@codingwithsukesh23 күн бұрын
Github pe java code bhi upload kro sir
@kumarashutosh-p3n8 ай бұрын
unordered_mapm; for(auto x:s) m[x]++; sort(begin(s),end(s),[&](char a, char b){ return m[a]!=m[b]?m[a]>m[b]:a
@VinayKumar-vm1hg11 ай бұрын
vec[ch] or we have to take index
@dayashankarlakhotia494311 ай бұрын
class Solution { public String frequencySort(String str){ char[]s=str.toCharArray(); int[]freq=new int[128]; for(int i=0;i
@xboy237411 ай бұрын
bhaiua run time error aa rhaa 32 test case mai se 29 chle
@codestorywithMIK11 ай бұрын
My code seems to be working fine. Can you share your code ?
@prathamdhiman707111 ай бұрын
Sir can you also code in java
@tech_funda_official8 ай бұрын
is solution me kya problem h? class Solution { public: string frequencySort(string s) { typedef pair P; vector arr(122); for (char& i : s) { int freq = arr[i].second; arr[i] = {i, freq + 1}; } auto lambda = [&](P &p1, P &p2) { return p1.second > p2.second; }; sort(arr.begin(), arr.end(), lambda); string ans = ""; for (int i = 0; i
@harshkumar40475 ай бұрын
Mention in the video title only for C++ language, bcz Java valo ko toh kuch samjh hi nhi aya.
@harshasshet67554 ай бұрын
bro concept to same hai just language is diferent learn concept and for code ask chatgpt and all fine
@harshkumar40474 ай бұрын
@@harshasshet6755 Beta 9:00 minute se jo isne bataya hai voh code based hai (C++ language specific), isme conceptual kuch nhi hai. Real conceptual videos irrespective of lang. dekhne hai toh jaa kr Striver dekh munna.