Pegasystems Interview Question

How to maintain a binary search tree while inserting elements?