Q8iEnG 0 Junior Poster 15 Years Ago Hi.. Is there any ready-made code for "Binary Search Tree" for Strings? if not, how to use Binary Search Tree with Strings? Thanks. java 0 0 Share Q8iEnG 0 Junior Poster 15 Years Ago Any idea? 0 0 Share jbennet 1,618 Most Valuable Poster Team Colleague Featured Poster 15 Years Ago Yes. Use e.g Copy to Clipboardif (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. 0 0 Share Q8iEnG 0 Junior Poster 15 Years Ago Yes. Use e.gCopy to Clipboardif (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. Umm, thanks for the code and reply mate. 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? 0 0 Share Share Facebook Twitter LinkedIn Reply to this topic Be a part of the DaniWeb community We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge. Sign Up — It's Free!
jbennet 1,618 Most Valuable Poster Team Colleague Featured Poster 15 Years Ago Yes. Use e.g Copy to Clipboardif (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. 0 0 Share
Q8iEnG 0 Junior Poster 15 Years Ago Yes. Use e.gCopy to Clipboardif (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. Umm, thanks for the code and reply mate. 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? 0 0 Share