UKG Campus 2026 | Coding Assessment | Complete Solutions & Tips | Graph Traversal & Modular Arithmetic | Nov 16th Assessment
Question · Posted Apr 2026
Question 1: Unit Conversions Problem Statement: There are unit_nodes types of unit, and (unit_nodes - 1) relations between them. The relations are defined using three arrays namely unit_from, unit_to and unit_weight where unit_weight[i] magnitude of type unit_to[i] equals 1 magnitude of type unit_from[i]. Given a parameter x, find the magnitude in each unit which will be equivalent to x magnitude in unit 1. For each unit, return the answer modulo (10^9 + 7). Note: The relationships between the units form ...
The full answer & interview discussion are available to premium members.
Log in Create a free account