I have lately learned how to use the LCA algorithm.
I am now wondering whether HLD can be used to solve problems that LCA can't solve or not?
What are your thoughts?
Thanks
Can LCA (Least Common Ancestor) be used instead of HLD (Heavy Light Decomposition)?
I have lately learned how to use the LCA algorithm.
I am now wondering whether HLD can be used to solve problems that LCA can't solve or not?
What are your thoughts?
Thanks