tomorrow's quote from my side: "Tell me how bad you want it"
@codestorywithMIK5 күн бұрын
🔥🔥🔥 Will use it
@gui-codes5 күн бұрын
How bad do I want it? Bad enough to wake up early, stay up late, and push through every challenge. Bad enough to silence doubt, ignore excuses, and outwork everyone else. Want it so bad that giving up isn't an option-it's the fuel that drives me forward every single day.
@harjotanand8344 күн бұрын
Done with segment Tree ....MIK sir's playlist 🛐🛐🛐🛐
@Shreya-x1f5 күн бұрын
Good morning, sir. In 2024, I achieved, learned, and developed a lot, but discovering your channel felt like my manifestation had come true. I have been consistently watching your videos for the past 3-4 months, and your consistency has greatly motivated me, sir. Thank you so much for being my all-time guiding brother. Wishing you a very Happy and healthy New Year, sir✨!
@hellsterkun87645 күн бұрын
Great Story Sir!
@yashraj58984 күн бұрын
Thank you so much sir< i was hoping from one video to another but found your channel. Thank you so much bhayia. and best wishes for the new year.
@SachinYadav-yx1rc4 күн бұрын
Thank you for explaining
@gui-codes5 күн бұрын
I was able to solve this on my own. 1st Jan - Done on my Own (Took your help from video in Approach-3) 2nd Jan - Done
@joydeep-halder5 күн бұрын
Thank you bhaiya. Aj ka question sach me bahut easy tha.
@bhuppidhamii4 күн бұрын
I got this video in my home feed. KZbin knows I need to learn coding
@imPriyansh775 күн бұрын
Marked my attendance, Bhaiya!! Happy New Year to you!!!
@subasm21604 күн бұрын
First thing that came to my mind after reading the question is segment tree, wrote the code and it got accepted, here to see another approach. Love your videos and explanation ❤
@LeetCode-Satish4 күн бұрын
thank you😊 pura samjh aa gya
@algosafari5 күн бұрын
sir you are great love you sir❣
@amankrsingh96094 күн бұрын
You make every question easy....I was able to solve the question after the explanation but 91 textcase pe fatgya then i got the accSum concept maja aa gya
@sarangkale67615 күн бұрын
Marked My attendance sir 😅
@gauravmundhada16475 күн бұрын
Very easy question.
@vishwashsoni6104 күн бұрын
sir this is how i solved this question : class Solution { public: vector vowelStrings(vector& words, vector& queries) { int n = words.size(); vector vowels(n, 0); for (int i = 0; i < n; i++) { bool checkStart = (words[i][0] == 'a') || (words[i][0] == 'e') || (words[i][0] == 'i') || (words[i][0] == 'o') || (words[i][0] == 'u'); bool checkEnd = (words[i].back() == 'a') || (words[i].back() == 'e') || (words[i].back() == 'i') || (words[i].back() == 'o') || (words[i].back() == 'u'); vowels[i] = (checkStart && checkEnd) ? 1 : 0; if (i > 0) { vowels[i] += vowels[i - 1]; } } int m = queries.size(); vector result(m, 0); for (int i = 0; i < m; i++) { int l = queries[i][0]; int r = queries[i][1]; if (l == 0) { result[i] = vowels[r]; } else { result[i] = vowels[r] - vowels[l - 1]; } } return result; } };
@aizad786iqbal5 күн бұрын
it's easy if you know the pattern and medium if u didn't , so it's correctly marked... also if brute force worked then we could have said it's easy, a good problem for beginners
@codestorywithMIK5 күн бұрын
Absolutely! ❤️
@m_fi89264 күн бұрын
Thanks MIK.
@best45675 күн бұрын
Using Set : class Solution { public: vector vowelStrings(vector& words, vector& queries) { int n = words.size(); vector result; unordered_set st = {'a' , 'e' , 'i' , 'o' , 'u'}; vector cumSum(n); int sum = 0; for(int i=0 ; i 0)result.push_back(cumSum[r] - cumSum[l-1]); else result.push_back(cumSum[r]); } return result; } };
@rajeshkumar-ws5ku4 күн бұрын
we can also solve using map in c++ class Solution { public: vector vowelStrings(vector& words, vector& queries) { /// here we write a code // traverse all words of an array words unordered_map mp; int count=0; int cnt=0; /// its time complexity is 0(n) for(auto it : words){ int n=it.size(); char first=it[0]; char last=it[n-1]; if( (first=='a' || first=='e' || first=='i' || first=='o' || first=='u') && (last=='a' || last=='e' || last=='i' || last=='o' || last=='u')){ cnt++; } mp[count]=cnt; count++; } /// now we apply operations on queries vector result; for(auto & q : queries){ int first=q[0]; int last=q[1]; int count1=0; count1=mp[last] - ( first==0 ? 0 : mp[first-1] ) ; result.push_back(count1); } return result; } }; /// time complexity 0( m + n); /// space complexity (m)
@MohammedHasmi5775 күн бұрын
Good morning sir ❤🎉
@anonymous_2464 күн бұрын
0:56 applying recursion in real life.
@devilinside545 күн бұрын
Sir please make video on pattern based problem please🙏🙏🙏
@abhinavgarg00774 күн бұрын
thanks for sharing,
@shubhamsahay58065 күн бұрын
class Solution { public: bool isVowel(string &s){ char st = s[0]; char e = s[s.size()-1]; return (st == 'a' || st == 'e' || st == 'i' || st == 'o' || st == 'u') && (e == 'a' || e == 'e' || e == 'i' || e == 'o' || e == 'u'); } vector vowelStrings(vector& words, vector& queries) { vector preSum(words.size()); vector ans; if(isVowel(words[0])) preSum[0] = 1; for(int i = 1;i < words.size(); i++){ if(isVowel(words[i])){ preSum[i] = preSum[i-1] + 1; } else{ preSum[i] = preSum[i-1]; } } for(auto vec : queries){ int l = vec[0]; int r = vec[1]; if(l > 0){ ans.push_back(preSum[r] - preSum[l-1]); } else{ ans.push_back(preSum[r]); } } return ans; } };❤❤
@jeevan-234 күн бұрын
Done with segment trees
@VaibhavSingh_code5 күн бұрын
har question easy hai medium bhi hard bhi aur easy to easy hai he
@masterLight3135 күн бұрын
This question is actually easy and only need preprocessed data to simply get queries data, self solved as below: vector vowelStrings(vector& words, vector& queries) { int n = words.size(); vector chk(n); unordered_set vow {'a', 'e', 'i', 'o', 'u'}; vector res; for(int i=0; i
@aditya128815 күн бұрын
Sir it's request make video on cpp sir ,you are great teacher need it .please sir
@Coder_Buzz075 күн бұрын
Bhaiya pattern based problem ka ek video bana dona plsss❤❤
@amtm05114 күн бұрын
how important is it to solve daily question? does it help and should i consistently give time to daily challenges?
@RishabhRaj-ox2dd5 күн бұрын
bhai aap jharkhand mei kahan se ho .... btw your method of teaching is exceptional ,..................
@gui-codes5 күн бұрын
LinkedIn me sir k profile me school me Vivekananda Central School mentioned hai. Which seems to be in Hazaribagh, Jharkhand. Poora stalk karliya hai maine MIK sir ko 😂
@aws_handles5 күн бұрын
Entering 2025 with solving Qns 😊 I wish everyone of you are able to crack your dream company jobs . ❤
@kanavbansal4505 күн бұрын
Bhaiya segment tree se bhi seekho do ye question please