Cognizant Interview Question

Apply BST in linear and moderate time complexities