โ† Josh Technology questions

Adjust left-child values in a binary tree by parity

Filed under Josh Technology

The question

Given a binary tree, update left child nodes so odd values are decremented by one and even values incremented by one, in linear time and constant space.

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

Related Josh Technology questions

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