Tesla interview question

Optimize js algorithms by binary trees