A regular binary search tree will just be all strung out in a single line and wouldn't have quadratic time for this input but a left-leaning red-black tree actually when, whenever it becomes a power of two is completely balanced as you can see from this example. 