• Post Reply Bookmark Topic Watch Topic
  • New Topic

Binary Search Tree  RSS feed

 
Cyrill wanda
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to use a binary search tree to read an ascii file that i have written but i need to split it into two components to form an object type defined by me and it shld print entries from the BST in alphabetical order using the city field as key. (I used inorder transver)

also it shld calculate the averagetemperature. (totalsum = all cities temp added together)
(Average = total sum/30) cities are 30

Please advice how i go about using a BST to split into two and printing the output in alphabetical order.
I have done part 1
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you show some code that points out where you are stuck? I wasn't clear from your post just what was working for you and what wasn't yet.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!