Sir contest ke solution bhi upload krna start krdo ager possible ho yo boht help hogi🙏🙏🙏
@tanyasingh40232 ай бұрын
Always waiting for your explanation videos
@robot3.0772 ай бұрын
itne achhe tarike se koi kaise samjha sakta hai 💌💌
@BombSquadHindiTipsTricks2 ай бұрын
savior of stucked questions
@akshaychavan55112 ай бұрын
After seeing this problem I definitely knew that it would be a recursive solution. However, I could not visualize the recursion for this problem which made it super tough for me. But thanks to MIK, now it's become super easy to understand.
@aizad786iqbal2 ай бұрын
nice, as per your suggestions earlier, we didn't need the solve functions, and I tried it worked with the given func itself only
@priya_k982 ай бұрын
Very well explained..!
@aws_handles2 ай бұрын
Crystal clear explanation man.
@AryanVats6032 ай бұрын
Best explanation sir
@priyobrotokarmakar65642 ай бұрын
Hello MIK first of all I want to thank you for your amazing teaching skill, the way you taught its really amazing.❤❤❤❤❤❤❤❤ and could you please tell what software you are using to teach us , it will really help me to take notes ❤❤
@AshutoshAnand-o5l2 ай бұрын
Great explaination mik!!!
@Playvish2 ай бұрын
Nice explaination
@UmmeKNeha2 ай бұрын
I always wait for your explanation. pls try to release the video early.
@abhinay.k2 ай бұрын
thank you
@focusman88012 ай бұрын
Solved using i,j in solve Thank you bhaiya class Solution { List solve(String s,int start,int end) { List res = new ArrayList(); for(int i = start;i< end;i++) { char ch = s.charAt(i); if(ch == '-' || ch =='+' || ch =='*'){ List left = solve(s,start,i); List right = solve(s,i+1,end); for(int l : left) { for(int r : right) { if(ch == '+') { res.add(l + r); } else if(ch == '-') { res.add(l - r); } else{ res.add(l * r); } } } } } if(res.size() == 0) { res.add(Integer.valueOf(s.substring(start,end))); } return res; } public List diffWaysToCompute(String expression) { return solve(expression,0, expression.length()); } }
@gauravbanerjee28982 ай бұрын
Thanks a lot bhaiya ❤❤
@piyushgupta50442 ай бұрын
Bhot hi bhdiya bhai
@thekindspill2 ай бұрын
Guruji 👌🏻
@ago75062 ай бұрын
daku for reason!!!!
@Its_Shubham_Negi2 ай бұрын
GOAT !!
@anubhavsharma3982 ай бұрын
bhaiya which mic you use for recording? Your voice is so clear.
@footballcreativeeverywhere2602 ай бұрын
love you bhai
@KavyaGupta-cc5vp2 ай бұрын
class Solution { public List diffWaysToCompute(String exp) { return solve(0,exp.length()-1,exp); } public List solve(int stIdx,int endIdx,String exp){ List list=new ArrayList(); for(int i=stIdx;i
inside first for loop in every time two inner for loop is running so time complexity will be o(n)*(2^n)*(n^2), is it right ?
@sujayvikramgs85882 ай бұрын
when i was trying to come up with an idea the ideas i had was of using a stack of sorts and I realised ki that wont be feasible the other was about maybe storing it as expression trees and all, again was too complex lol idk fi thats right even
@BatttttMan2 ай бұрын
same, i too was thinking of stack, sort.... 😕
@vBlxzeYT2 ай бұрын
Bhaiya I dont understand how result.push_back(x + y) is pushing an integer in the array as we didnt convert it to int cuz last case will only work if the whole string doesnt contain any operator plz help
@BatttttMan2 ай бұрын
bro don't be sad, I will make it crystal clear for you 🙂 Basically, for any expression, the base case will be an expression without any operator , cuz we keep Splitting the expression whenever we are seeing operator so obv. at the end, it will be an expression without any operator. Since There will be No operator at the base, WE WILL NOT GO INTO THE LOOP and Return The Expression (no operand will be there) in the form INT (using stoi) to the Result Vector and It will be Returned to 'Left-Result' or 'Right - Result' Vector, Hence We Will Be Getting Vector of INT.
@vBlxzeYT2 ай бұрын
@@BatttttMan thx a lot bro ❤️
@codestorywithMIK2 ай бұрын
Thank you 😇❤️
@anshror25832 ай бұрын
Bhai biweekly 139 k contest k 3 and 4 p bna do
@rasish67492 ай бұрын
please do rotten oranges
@jeehub0412 ай бұрын
Sir vo har pairs ko check kar rahe uska bhi toh Time complexity hoga na and koi base case bhi nahi ha kyu?
@nileshsinha78692 ай бұрын
I have one question. How the +, - and * is happening with string and getting added in integer vector
@codestorywithMIK2 ай бұрын
Notice that in the end when you only have digits (no operator), you will not enter for loop and in the end you will return the integer (stoi)
@nileshsinha78692 ай бұрын
But let’s suppose in line 15 the x and y will be character right ? And they are getting stored in integer vector
@rohitaggarwal87762 ай бұрын
Yeh question hard mai aayega not medium
@rev_krakken702 ай бұрын
Was using dp for this.. is it even necessary?
@prathmeshkakde37312 ай бұрын
as always nice explanation mik bhaiya
@shobhitsingh86952 ай бұрын
I created separate array for numbers and operators Very similar to Unique BST 2 class Solution { public: vector numbers; vector op; map mp; vector solve(int l, int r){ if(l == r) { return {numbers[l]}; } if(mp.find({l , r}) != mp.end()){ return mp[{l , r}]; } vector res; for(int i=l;i
@harshupadhyay24222 ай бұрын
can this be done using mcm?
@RohitKumar-dz8dh2 ай бұрын
Pattern to ussi k jesa lag raha
@RishabhChatterjee-fg2gz2 ай бұрын
Pehele question mein all possible ways keyword dekh Kar mere dimag mein backtracking aaya tha, fir koi approach nehi aaya dimag mein, to topics tag dekha woha dp tha par mujhe dp nehi aata, isiliye solve nehi hua, and options nehi samajh ayya question mein to recursion se kyese hoga ye bhi nehi hua. So solved after watching explanation and approach. How to find options from a recursion based question? Pls say bhaiya
@omkarawasthi4022 ай бұрын
Hello bhaiya, jo left and right ka recursion call kar rhe hai usme 'string' se 'int' me kaise le rha hai.
@prathmeshkakde37312 ай бұрын
wo call jab tak chalega ki for loop se koi element add nahi hua aur jo last me check karega reslut.isEmpty() tab wo string to int convert kar lega
@anammofazzaldurjoy79702 ай бұрын
need dp approach as well bro
@yashnatholia23322 ай бұрын
class Solution { public: unordered_mapmp; vector diffWaysToCompute(string expression) { vectorans; int n = expression.size(); for(int i=0;i
@cosmicthor73302 ай бұрын
Bhaeeya sab soch ney key baad code nhi likh pata any tips plz 😢
@Coder_Buzz072 ай бұрын
Practice
@madhurgupta95752 ай бұрын
Bhaiya, Chummi lelo, Kya video banayi h. 10 video dekh li kasam se, but this explanation was best....
@udaysingh29292 ай бұрын
😅😅
@sidhantmalik32882 ай бұрын
bhaiya ko toh m bhi dungaa bhaiya if possible plz dbms p video bnadoo meri job lg jyegi
@varunpalsingh38222 ай бұрын
😂
@aws_handles2 ай бұрын
😂
@Himanshhhhxu2 ай бұрын
Control bhai control
@the_only_one94152 ай бұрын
Hello sir, why u didnt used dp in this problem?
@codestorywithMIK2 ай бұрын
Definitely you can. Memoize it.
@the_only_one94152 ай бұрын
@@codestorywithMIK ok sir, Thank you
@BatttttMan2 ай бұрын
Constraints in the Question were Light....
@saarvikjaiswal34582 ай бұрын
Hello MIK bhai, I’m new to your channel and I saw great response from people watching you. I have always faced difficulties in Dsa like understanding the concept and problem related to it is not the tougher job but whenever I’ve tried solving on my own it just doesn’t happen to be. I’m requesting you to provide a sheet/combined playlist starting from basic concepts and their problems to slowly climbing the difficulty ladder to advance or med-hard problems. Please take this into consideration 🥺