binary « iterator « Java Collection Q&A

Home
Java Collection Q&A
1.algorithm
2.array
3.Array Byte
4.Array Char
5.Array Convert
6.Array Dimension
7.Array Integer
8.Array Object
9.Array String
10.ArrayList
11.collection
12.comparator
13.Development
14.Garbage Collection
15.Generic
16.hash
17.HashMap
18.HashTable
19.iterator
20.LinkedList
21.List
22.Map
23.queue
24.Set
25.Sort
26.tree
Java Collection Q&A » iterator » binary 

1. Java binary tree which return type for iterator over nodes, interface or class?    stackoverflow.com

I'm writing a class for a binary tree, and in the tree interface this function is defined:

/** Returns an iterable collection of the the nodes. */
    public Iterable<Position<E>> ...

2. PostOder Iterator in a Binary Search Tree    forums.oracle.com

} } but it dos not work, it enters in a loop. The Item that i am using is an Integer. i am not understanding you while cicle: while(current==null) { stack.push(current); if(current.left==null) current=current.left; else current=current.right; } why do you want to push up current ? does that not enters in a loop ? other question , if the left is already ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.