MathWorks Interview Question

Hackerrank coding question included a binary tree search