This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import junit.framework.TestCase; | |
import java.util.Iterator; | |
/** | |
* Created by motan on 23.06.2015. | |
*/ | |
public class TestIterator extends TestCase { | |
public void testIterator() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import junit.framework.TestCase; | |
/** | |
* Created by motan on 23.06.2015. | |
*/ | |
public class TestBst extends TestCase { | |
public void testInsert() { | |
BinarySearchTree<Integer> tree = new BinarySearchTree<Integer>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Iterator; | |
import java.util.Stack; | |
/** | |
* Created by motan on 23.06.2015. | |
*/ | |
public class BstIterator<T> implements Iterator<T> { | |
Stack<Node<T>> stk = new Stack<Node<T>>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Iterator; | |
import java.util.Stack; | |
/** | |
* Created by motan on 23.06.2015. | |
*/ | |
public class BstIterator<T> implements Iterator<T> { | |
Stack<Node<T>> stk = new Stack<Node<T>>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Comparator; | |
import java.util.Iterator; | |
/** | |
* Created by motan on 23.06.2015. | |
*/ | |
public class BinarySearchTree<T extends Comparable<T>> implements Iterable<T>{ | |
private Node<T> root; | |
private Comparator<T> comparator; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import junit.framework.TestCase; | |
/** | |
* Created by motan on 23.06.2015. | |
*/ | |
public class TestBst extends TestCase { | |
public void testInsert() { | |
BinarySearchTree<Integer> tree = new BinarySearchTree<Integer>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Comparator; | |
import java.util.Iterator; | |
/** | |
* Created by motan on 23.06.2015. | |
*/ | |
public class BinarySearchTree<T extends Comparable<T>> { | |
private Node<T> root; | |
private Comparator<T> comparator; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by motan on 23.06.2015. | |
*/ | |
public class Node<T> { | |
public T data; | |
public Node<T> left, right; | |
public Node(T data, Node<T> left, Node<T> right) { | |
this.data = data; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<config> | |
<modules> | |
<Inspiricon_Personalize> | |
<version>0.1.0</version> | |
</Inspiricon_Personalize> | |
</modules> | |
</config> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<config> | |
<modules> | |
<Inspiricon_Personalize> | |
<active>true</active> | |
<codePool>local</codePool> | |
</Inspiricon_Personalize> | |
</modules> | |
</config> |