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 hints

Topics


More Sprinklr Questions

View all Sprinklr questions