遍历
[LeetCode]Binary Search Tree Iterator,解题报告
题目中给出的空间复杂度为O(h),而我使用的空间复杂度为O(2n),,不符合题目的要求。因此需要考虑如何修改代 … 阅读更多
【Java】用JDK1.5之后的新型数组遍历方法遍历HashMap、HashMap不
在JDK1.5就多了一种for循环的遍历写法,现在应该没有人用JDK1.4了吧?我见那些2005年出的JAVA … 阅读更多
[经典面试题][百度]数轴上从左到右有n各点a[0], a[1], ……,a[n
题目 数轴上从左到右有n各点a[0], a[1], ……,a[n -1],给定一根长度为L的绳子,求绳子最多能 … 阅读更多
[LeetCode]Construct Binary Tree from Inorder and Postorder T
Given inorder and postorder traversal of a tree, constr … 阅读更多