![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
wihoho
这个作者很懒,什么都没留下…
展开
-
二叉树和图:确定能否从一个点遍历到另一个节点
Use recursion and traversal to solve. boolean BSTbranch(TreeNode start, TreeNode end){ if(start == end) return true; if(start != null){ if(!BSTbranch(start.left, end){ if(...2011-05-06 12:54:01 · 225 阅读 · 0 评论 -
由preOrder和inOrder构建二叉树
Let us consider the below traversals: Inorder sequence: D B E A F CPreorder sequence: A B D E C F In a Preorder sequence, leftmost element is the root of the tree. So we know ‘A’ is root for...2011-05-09 16:29:41 · 963 阅读 · 0 评论 -
Circular doubly linked list and implementation
class Node<E>{ E item; Node prev, next; Node(E newItem){ item = newItem; prev = next =null; } } class CircularDoublyLinkedList{ private ...2011-05-09 18:37:42 · 122 阅读 · 0 评论