Could anyone suggest a good problem? I checked out CP algos Looked at the implementation using stack but i have no idea when and how to use it in problems
@@vivekgupta3484 already find and unite working in O(logn) in rank compression so isn't O(1) rollback quite insignificant improvement. Isn't adding path compression to this sensible?
@@srijaysinghgusain7245 rollback is not improvement, its a functionality that allows you to query on updated version of DSU without creating DSU from scratch( which is O(N) )
Do like and Subscribe to support creating more such educational content!
Man how did I miss this, Thanks a ton Vivek!!
Thanks vivek for this appreciate.
Could you please share the implementation of this if possible. ?
Hi Vivek, You can add related problems under every video which will help in implementing the learned concepts. Otherwise Great Content as usual 🔥
Some problems to practice plz.
👍👍👍👍
Could anyone suggest a good problem?
I checked out CP algos
Looked at the implementation using stack but i have no idea when and how to use it in problems
Won’t find operation without path compression takes O(n) in worst case? If it becomes a skewed tree?
Rank compression ensures height as logN.
is there no way to use path compression along with rollback efficiently?
whatever you do needs to be reverted... You might to revert O(logn) things... so its best to only do rank compression.
@@vivekgupta3484 already find and unite working in O(logn) in rank compression so isn't O(1) rollback quite insignificant improvement. Isn't adding path compression to this sensible?
@@srijaysinghgusain7245 rollback is not improvement, its a functionality that allows you to query on updated version of DSU without creating DSU from scratch( which is O(N) )