2846. Minimum Edge Weight Equilibrium Queries in a Tree | Binary Lifting | Weekly Leetcode 361

preview_player
Показать описание
Similar Problems -

*************************************************

*************************************************
Timestamps -

00:00 - Agenda
00:35 - Problem Description
03:25 - Finding minimum # of operations
07:15 - Brute Force solution
07:45 - Intuition to optimize the solution
10:50 - Finding the frequency array efficiently
13:43 - Time Complexity of Query
15:40 - Dry run of the Algorithm
21:20 - Pseudo code & Time Complexity
23:00 - Code Walkthrough

*************************************************
Interview Experiences Playlists -

*********************************************************************

Please show support and subscribe if you find the content useful.
Рекомендации по теме
Комментарии
Автор

26:16 from line number 49 to 53.
Here par[j][u] means 2^j th parent of 'u' right? If that's the case then we are only checking for 2^14th, 2^13th 2^0th par of both the nodes. What about the parents who are not a power of 2? For an example, 9th parent of 'u' and 'v' could be the LCA. So we have to check bitwise for 2^3rd parent and then 2^1th parent from it to get answer right? Please help me out with this query.

karma_kar
Автор

Thank you for your LCA video which u did months back, because of which I was able to solve this ques by myself.😊

kartikgarg
Автор

nice explanation thank you for clear explaination

LBK
Автор

Can you please tell the name of the previois 2 problems which occured in previous contests. Problem name or Link any1 would be of great help. ✌️
P.S :-Thanks bro for making this video, inspite of knowing you wont get many views as people wont upsolve this one💯.

loudcapricorn
Автор

Sir please change youtube channel profile pic

anupkumardutta_
visit shbcf.ru