Freshworks Interview Question

Binary tree printing on all combinations