Create Components With Same Value at Sprinklr
Hard53.3% acceptance
This problem has 100.0% frequency at Sprinklr.
Problem Description
There is an undirected tree with `n` nodes labeled from `0` to `n - 1`. You are given a **0-indexed** integer array `nums` of length `n` where `nums[i]` represents the value of the `ith` node. You are also given a 2D integer array `edges` of length `n - 1` where `edges[i] = [ai, bi]` indicates that...
Read full problem and hintsTopics
More Sprinklr Questions
Minimum Edge Weight Equilibrium Queries in a TreeHardNumber of Great PartitionsHardApply Operations on Array to Maximize Sum of SquaresHardNext Greater Numerically Balanced NumberMediumCount the Number of Powerful IntegersHard
View all Sprinklr questions