Results 1 to 8 of 8
Thread: [SOLVED] BST Frequency Counter
- 04-27-2008, 07:41 PM #1
Member
- Join Date
- Apr 2008
- Posts
- 23
- Rep Power
- 0
[SOLVED] BST Frequency Counter
I really need help on this one.
Let me break this down I have two BST, one to hold all the letter of the alphabet and the other BST, which hold all the words that contains that letter.
My problem is how do I call the 2nd BST within the 1st BST. I want my code to search the first BST for the letter the word began with, and then within that insert method call the second BST insert method.
I hope that make sense.
- 04-28-2008, 10:31 AM #2
what is BST ?
dont worry newbie, we got you covered.
- 04-28-2008, 10:44 AM #3
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
May be he is talking about Binary Search Tree root.
- 04-28-2008, 02:42 PM #4
Member
- Join Date
- Apr 2008
- Posts
- 23
- Rep Power
- 0
Yeah, a BST is a Binary Search Tree, and I'd figured it out. Thanks
- 04-29-2008, 03:48 AM #5
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Ok pal, if you have solved your question, please mark it as SOLVED. :)
- 04-29-2008, 04:48 AM #6
could you please post your solution so that if others have the same problem they can refer back to this thread instead of creating a new one. That is how the forums are suppose to work.
My IP address is 127.0.0.1
- 04-29-2008, 04:52 AM #7
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
That's a grate idea Zosden. ;)
- 04-29-2008, 11:33 PM #8
Member
- Join Date
- Apr 2008
- Posts
- 23
- Rep Power
- 0
Ok, the quick and dirty explanation is to make your primary BST have a BST container ie:
and then whenever you want to have access to the secondary BST method just use a code like "node.secondaryBST.method()"Java Code:private class Node{ Node left, right; String data; BST secondaryBST = new BST(); }
I hope that make sense, if anyone need more explanation just let me know.
Similar Threads
-
Help with static variable counter
By silvia in forum New To JavaReplies: 1Last Post: 07-19-2007, 07:53 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks