← Amazon questions

Virus spread in binary tree and product array except self

Filed under Amazon

Solve two problems: 1) Given a binary tree and a target node where a virus starts, find the time (days) to infect the whole tree (1 day per adjacent node). 2) Given an array, return an array where…

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 Amazon questions

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