I was coding up a Generic Treap data structure as an exercise, and then performed an analysis on the size (number of elements) of the treap, height of the treap, as well as the treap constant (height / log10(size)). I found that the height of my Treaps were almost always double the log2(size), which is double the expected height.
For example, inserting the same 934 elements (size = 934) in the treap 10 times, the height of the treap was around the range [19, 26], and my treap constant was roughly around 6-7.
Assuming my insertion, height, and randomPriority methods are all correct, might there be another reason that my Treap height is so tall?
I have also tried this with numerous data types and found that my heights were always around double the expected height.