Expedia Group interview question

Implementation of binary tree and it's pseudocode