C++/Java/Python Code & Notes: drive.google.com/file/d/1bnuuFTVBN8TjWLX-UjK3mT23tKg9VcSy/view?usp=share_link It is one of THE BEST Graph Intuition Problem, i have seen lately, so do solve this one 😎, and haan questions solve ho rahe hai rooj, yaa skip maar rahe ho 😒????
@vaibhavgupta973
Жыл бұрын
5 din se roz solve kr raha hu
@sakshidevi353
Жыл бұрын
I have a title for you Aryan: CUTE PROGRAMMER
@princekoshti7245
9 ай бұрын
Hey Aryan ... But what about equations having ab/cd and d/b and we want to calculate a/c .. in this case surely the algo won't find a and c in the map and hence store -1.0 in the ans !!!
@Seanabo
8 ай бұрын
For the variables named "ab", "cd", those are their own variable. i.e. "ab" "a" and "b" are all unique ID's in this problem.
@Xzist2382
3 ай бұрын
I ended up wasting 2hrs on this point, the point is ab is a single node, and not a*b……..ab is like id of that node…..
I upvoted for the quality. I am watching this on x1.25 and I really wish you utilized better intonation instead of rambling bursts that last for multiple seconds.
Really nice explaination sir .......really hard to get the intutiion and after that it is a task to store the graph and apply dfs also the vis array is stored in a set so that find in O(1)...great explaination sir and great problem
@himaniupadhyay8201
Жыл бұрын
awesome sir ..........thank u soo much for providing us regular vdos with best explanation sir plzz also suggest some good projects which can boost up our resume
@ayushbhandarkar8394
Жыл бұрын
Man once again ! What a great explanation !
@vaibhavchaubey8373
Жыл бұрын
What a great explanation !
@VivekYadav-ds8oz
Жыл бұрын
This is why you should always look up solutions after solving them. Like Aryan I also did it by DFS/BFS (BFS to be precise), and when I looked up solutions on LC, people have done it by Union-Find. I recommend you guys think how you would do it by UF, or look up that solution. It's brilliant. EDIT: Also I recommend first converting all the variable names to some integer, i.e get some mapping from string -> ID. This will massively simplify your workflow and graph. I did it this way.
@rahulbishnoi2655
Жыл бұрын
Can you please tell me how it works , i seen lot of solution but i am not able to understand. Please provide the intution and explanation of UF method
@VivekYadav-ds8oz
Жыл бұрын
@@rahulbishnoi2655 It's gonna be hard, with just text, but I can try. So, imagine an ideal scenario, where all variables could be expressed as a function of a base variable, say X. So, for example A = 0.53*X, B = 0.22*X, whatever X may be. Now, if that were the case, you could easily calculate A/B. A/B = 0.53*X/0.22*X = 0.53/0.22. Notice how you don't need the value of X, just the relationship with X. Now, notice another thing: A/B is only calculate-able if there is a relationship of both with a common variable. Now that common variable need not be same for all A's and B's, but there needs to be one. It may be that the common variable is A. So, A = 1*A, B = 0.22*A. Or it could be some other arbitrary variable X, as explained above. But, at the end of the day, it must be the case that both of them can be traced to a common variable. If they can't, that means we can't calculate A/B. After this, I suggest you now look up that one popular solution in the Solutions tab that implements Union Find.
@sukhpreetsingh5200
Жыл бұрын
awesome explanation💗💗
@aryansonwani7061
Жыл бұрын
Nice explanation 🔥
@khushivaish7125
Жыл бұрын
Great work
@justajay2228
Жыл бұрын
Great Solution bhrother, BTW do you have any discord sever where we can connect to you if not please make one brother, plz
Пікірлер: 24