Pegasystems interview question

How to maintain a binary search tree while inserting elements?