HashedIn by Deloitte interview question

Sorting in Binary Search Tree