AKUNA CAPITAL Interview Question

two questions about binary tree