← All problems
Medium · Trees

Delete Leaves With a Given Value

Repeatedly delete leaves matching the target, including newly exposed leaves.

Full problem and submission ↗
main.js

Console

Ready