We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
用递归的思路,比较左子树和右子树,取长的子树长度。
O(N)
O(1)