Halloween Sale
Unlock all premium questions for over 30% off
Maximize Edge Label Sum in Graph
Medium
Question
The graph is undirected and has n nodes. Its links come in edges; an entry [a_i, b_i] means a_i and b_i are directly linked. Give every node its own integer label between 1 and n, so that no two nodes share a label. An edge (u, v) is worth the two labels at its ends added together, label(u) + label(v).
...
Asked at:Microsoft
More Microsoft interview questions
- Set Even Parity Biteasy
- Design Recent Files Trackereasy
- Build the Longest Spike Sequencemedium
- Lowercase Before Uppercase Letter Countmedium
- Minimum Adjacent Swaps for Ball Groupingmedium
- Valid Clock Time Combinationsmedium
- Office Gift Delivery Schedulerhard
- Recent Search History Systemhard
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.