The class BSTree implements a binary tree with the following
property: for each node n, every left-subtree value is less then the key value
v stored in n and every right-subtree value is greater then v.
Partitions array into two segments: the first segment all elements are less
than or equal to the pivot value (bound), the second segment all elements are
greater or equal to the pivot value.