| | |
How to use Binary Search Tree with String? Is there any ready code?
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
-7
#3 Nov 3rd, 2009
Yes. Use e.g
I used a BST like this as part of an english-to-french translator.
Java Syntax (Toggle Plain Text)
if (stringname.compareTo(otherstringname) < 0) { // the word is "greater" than the other one, so e.g add it to its "right" }
I used a BST like this as part of an english-to-french translator.
If i am helpful, please give me reputation points.
•
•
Join Date: Jun 2008
Posts: 130
Reputation:
Solved Threads: 2
0
#4 Nov 3rd, 2009
•
•
•
•
Yes. Use e.g
Java Syntax (Toggle Plain Text)
if (stringname.compareTo(otherstringname) < 0) { // the word is "greater" than the other one, so e.g add it to its "right" }
I used a BST like this as part of an english-to-french translator.
But, I really didn't got it! and Will this will work with array of strings?
For example if I have an array of strings, will this method sort the array to a BST?
![]() |
Similar Threads
- Create code for Binary Search Tree using compareTo method using I/O (Java)
- Binary Search Tree (C++)
- Help explain successor binary search tree code thanks (Java)
- Binary Search tree help in Java 98% complete (Java)
- Binary search tree help please (C++)
- Binary Search Tree within in BT ? (C++)
- Output Binary Search Tree to file help (C++)
- Pascal, Strings in A Binary Search tree (Pascal and Delphi)
- Help implementing a binary search tree in Java (Java)
- Help with binary search tree insertion (C++)
Other Threads in the Java Forum
- Previous Thread: Casting of int[] to Object[]
- Next Thread: Error [for the type QPlainTextEdit]
| Thread Tools | Search this Thread |
Tag cloud for Java
affinetransform android api apple applet application arc arguments array arrays automation binary bluetooth businessintelligence chat class classes client code component database desktop draw ebook eclipse encode equation error event exception file fractal game givemetehcodez graphics gui helpwithhomework html ide image input integer intersect j2me java javaexcel javaprojects jmf jni jpanel julia linked linux list loop mac main map method methods mobile netbeans newbie number object online open-source oracle parameter print problem program programming project properties recursion reference replaysolutions rotatetext scanner score screen scrollbar server set size sms socket sort sql string superclass swing template test threads time tree windows xstream






