title: Optimal Way To Generate A Balanced Binary Search Tree From A Stream Of Sorted Numbers
body: <p>I have an input stream of integers coming in an ascending order, my task is to create a balance binary search tree out of that stream, on the fly. I have gone through the link:<a href="https://stackoverflow.com/questions/7236172/create-a-balanced-binary-search-tree-from-a-stream-of-integers">BBST from a stream of integers</a> and understood that we can make use of Red-Black trees. The thing is, I am looking for more optimal solutions that use 'sorted information' from the input data.</p>