Binary Tree Cameras at eBay

Hard47.6% acceptance

This problem has 75.0% frequency at eBay.

Problem Description

You are given the `root` of a binary tree. We install cameras on the tree nodes where each camera at a node can monitor its parent, itself, and its immediate children. Return _the minimum number of cameras needed to monitor all nodes of the tree_.

Read full problem and hints

Topics

Also asked at 14 companies


More eBay Questions

View all eBay questions