โ† Arcesium questions

Delete leaf nodes with weight less than k

Filed under Arcesium

Given a binary tree and an integer k, delete all leaf nodes whose path weight (sum of node values from root to that leaf) is less than k, without using extra space (other than recursion stack).

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Arcesium questions

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