Recently, I was coding a comparator function for use in a set backed by a binary search tree, and the set kept saying that it didn't contain elements that I had previously added to it. I eventually realized that the ordering I had implemented in the comparator was to blame, which got me thinking:How would a binary search tree change if its elements were ordered by different orders (partial, total, strict, etc...)?Documentation on the C++ STL set says that the ordering must be strict and weak otherwise behavior is 'undefined', but I'd be interested to hear if anyone could give a more in-depth analysis.
What effect would using different types of orders have on a binary search tree?
ds.data structures;partial order;order theory