โ† Paytm questions

Alternate digits number generation and closest leaf in binary tree

Filed under Paytm

The question

Generate a new number using alternate digits from a given number starting from the left (with even numbers at even indices and odd numbers at odd indices), and find the closest leaf to a given node in a binary tree.

No write-up yet. Related questions below have one.

Related Paytm questions

Collected from public candidate posts and coding forums. Updated Nov 2026.