Maximum Genetic Difference Query at Media.net

Hard46.4% acceptance

This problem has 87.5% frequency at Media.net.

Problem Description

There is a rooted tree consisting of `n` nodes numbered `0` to `n - 1`. Each node's number denotes its **unique genetic value** (i.e. the genetic value of node `x` is `x`). The **genetic difference** between two genetic values is defined as the **bitwise-****XOR** of their values. You are given the...

Read full problem and hints

Topics


More Media.net Questions

View all Media.net questions