0

I'm studying Java data structures and algorithms in college and we have come across the topic of binary search trees and tree transversal but I don't see the purpose of these topics in my programming.I know that they can be modified so that you can control the search path and search times can be improved.My questions are as follows:

1.When would a binary search tree be used in a program?(examples)

2.Some examples of when binary search trees are used in real world application?

Brian Var
  • 6,029
  • 25
  • 114
  • 212
  • 4
    if you don't see the advantage over using an array then you did not understand what the matter is with binary search trees. btw. one application is when you want to maintain an ordered collection. – kutschkem Feb 28 '13 at 12:52
  • 1
    The advantage is O(log n) versus O(n) for search. Think "divide and conquer". – duffymo Feb 28 '13 at 13:06
  • `studying Java data structures` sound weird. Data structures are not only used in Java. Especially search trees are very wide-spread. – Martin Thoma Feb 28 '13 at 14:00
  • Dupe: [what-are-the-applications-of-binary-trees](http://stackoverflow.com/questions/2130416/what-are-the-applications-of-binary-trees) – nawfal Jun 13 '14 at 09:47

1 Answers1

5

CouchDB, like most other databases used binary search trees. Here's an article that describes how it uses it. You might find it interesting.

mprivat
  • 21,582
  • 4
  • 54
  • 64