API documentation and balanced binary tree