Basic BST questions
From: Davey (davey_at_hello.com)
Date: 02/28/05
- Next message: Puneet: "Expert J2EE Freelancer"
- Previous message: Roger Varley: "Tomcat, IIS and SSL"
- Next in thread: Oscar kind: "Re: Basic BST questions"
- Reply: Oscar kind: "Re: Basic BST questions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 28 Feb 2005 18:03:00 +0100
I understand the purpose of a Binary Search Tree and I understand what a
full tree represents, but I don't understand a couple of fundamental
concepts regarding this data structure.
First of all, I'm not sure how objects are added to a tree. Say we create a
tree which holds characters and we have an array with the characters X, Q,
I, T, A, S, P, B and C. How do these characters from the array get added to
the tree? In the order they are in the array? i.e. X first, then Q as the
left node of X, then I as the left node of Q, then what with T? Then how do
we get a balanced tree that is useful for searching?
Any help would be appreciated.
- Next message: Puneet: "Expert J2EE Freelancer"
- Previous message: Roger Varley: "Tomcat, IIS and SSL"
- Next in thread: Oscar kind: "Re: Basic BST questions"
- Reply: Oscar kind: "Re: Basic BST questions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|