Hello. I have to design 2 classes that use a binary search tree for storing some orders for some products. I've researched on the Internet about BST implementations in Java, and I've found TreeSet. Do you have any other suggestions? Thank you:)

Recommended Answers

All 2 Replies

Okay the 2 classes are Node and BST

class Node has
value of type integer
left and right node of type Node

class BST has
root of type Node
Insert method using recursion (prefered recursion)
Find method using recursion (remember it's a tree, so recursion should be your friend now)

For any implementation help feel free to ask, but you have to try it by yourself first as the rules of this forum requires :) Good Luck

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.