| | |
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
-xlint 2dgraphics android api apple applet application applications arguments array arrays automation bank binary bluetooth chat class classes client code collision component database db development draw eclipse eclipsedevelopment error event exception file fractal game givemetehcodez graphics gui helpwithhomework homework html ide image input integer integration j2me jarfile java javadesktopapplications javafx javaprojects jmf jni jpanel julia learningresources linux list loop map method methods mobile netbeans newbie number object oracle print problem program programming project projectideas recursion researchinmotion scanner screen server service set size sms socket sort sorting sql sqlserver state string swing swt tcp test text-file threads time tree web windows






