Available question text
Given a tree (or graph) whose nodes are labeled 0 or 1 and a set of rules/operations that change node values based on ancestors or path flips, determine how many nodes end up with value 1. This typically requires a DFS/BFS that carries a cumulative flip/XOR state (or other propagated state) and careful bookkeeping to apply updates efficiently.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
Google
Leetcode 2445. Number of Nodes With Value One
Reported Jan 13, 2025 · 1 source report
MID_LEVEL
Source snapshot: Nov 12, 2026
View source