We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
原文如下: 时间复杂度:O(n) 空间复杂度:O(log n),算上递推系统栈的空间
//感觉这里的空间复杂度似乎没有算上unordered_map的空间开销?遍历整个二叉树的时候,会将所有的节点存入unordered_map,所以空间复杂度应该为O(n)?
原文链接:https://programmercarl.com/0337.%E6%89%93%E5%AE%B6%E5%8A%AB%E8%88%8DIII.html#%E8%AE%B0%E5%BF%86%E5%8C%96%E9%80%92%E6%8E%A8
The text was updated successfully, but these errors were encountered:
No branches or pull requests
原文如下:
时间复杂度:O(n)
空间复杂度:O(log n),算上递推系统栈的空间
//感觉这里的空间复杂度似乎没有算上unordered_map的空间开销?遍历整个二叉树的时候,会将所有的节点存入unordered_map,所以空间复杂度应该为O(n)?
原文链接:https://programmercarl.com/0337.%E6%89%93%E5%AE%B6%E5%8A%AB%E8%88%8DIII.html#%E8%AE%B0%E5%BF%86%E5%8C%96%E9%80%92%E6%8E%A8
The text was updated successfully, but these errors were encountered: