12 Replies Latest reply: Apr 1, 2011 2:22 PM by walterln RSS

    Building Binary Searh Tree with multiple types (hint hint Generics?)

      I have built binary search trees before and even wanted to build a B+ tree for primary indexes but my Professor suggested limiting to BST.

      My question is can I build a BST with a generic type parameterized code using Comparable and Generics to help me insert numeric and non-numeric (String) type nodes using the requirement that anything less than the root go left, greater than or equal to the root go right. There will be no duplicates.

      This is definitely new territory for me so any help is appreciated.