摘要:
树的题递归来做。给定一个root,如果左右两颗子树height一样,那么root就是所求的解;如果不一样,那么解一定再height高的那棵子树里,递归调用即可。height和depth的区别:What is the difference between tree depth and height? 阅读全文
摘要:
参见 307. Range Sum Query - Mutable Segment Tree Tree Implementation (SegmentTreeNode) https://www.youtube.com/watch?v=rYBtViWXYeI&list=PLLuMmzMTgVK7ug0 阅读全文