Hi.
I need some help. I want to know why there are exactly n-1 possible rotations on a binary search tree?.
Hi.
I need some help. I want to know why there are exactly n-1 possible rotations on a binary search tree?.
There aren't exactly n-1 possible rotations...or maybe there are. I can't say, unless you provide a little more info. Telling us what n represents is a good start. Must all these rotations be in the same direction? Must they all be performed on some particular node, like the root? Where did you hear/read this?
It's an exercise that I have to do for Data structures class. I don't know what "n" means exactly. That's all it says. :s
I asked here and received this answer. Number of possible rotations. Binary search tree - Stack Overflow
I hope is correct