Freshworks interview question

Binary tree printing on all combinations