Available question text
Given a tree with integer node values, compute the XOR-sum of nodes for every node's subtree and find two node-disjoint subtrees whose subtree-XOR values produce the maximum bitwise XOR. The challenge is to efficiently generate and compare subtree XORs under the non-overlap constraint (avoiding O(n^2) pair checks), typically requiring tree traversal combined with bitwise-tries or merge-on-tree techniques.
Related questions
Continue with questions that share topics or the same question type.
- Maximum Sum of Two Non-Overlapping Subarrays
Coding · Array · Dynamic Programming · Sliding Window
- Find Two Non-overlapping Sub-arrays Each With Target Sum
Coding
- Maximum Number of Non-overlapping Palindrome Substrings
Coding
- Maximum Number of Non-Overlapping Subarrays With Sum Equals Target
Coding
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
No company association
Leetcode 2479. Maximum XOR of Two Non-Overlapping Subtrees
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source