Search code examples
data-structuresred-black-tree

Can there be more than one Red Black Tree possible for a given keys?


In case possible, please provide me an example. Thanks in Advance


Solution

  • Yes, for example, just with the keys 1 and 2 you can have:

    1b 2r

    or

    2b 1r