← Swiggy questions
CodingReported in a candidate post, Jul 2025

Minimum operations to turn a weighted tree into a special tree

Filed under Swiggy

You are given a tree with n vertices, each with an integer weight. In one operation you choose a vertex and increase its weight by 1. Find the minimum number of operations so that, for every edge, the…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Swiggy questions

Collected from public candidate posts and coding forums. Updated Nov 2026.