Answer: Uber, Recently asked On-Campus OAs in IIT-D on 30th October, 2022

Answer · Posted Jul 2026

Question 1- Solution:  we can see the problem as a graph problem. assume initially there are n components (n students) and after each operation (professor choosing) two compontents get merged and the cost to merge them will be min(id[i]*roll[j], id[j],roll[i]), we are asked to find mininum cost to merge all components into one  and we can see there are only n-1 components since the last student don't have to pair with anyone, so we just need to find MST by ...

The full answer & interview discussion are available to premium members.

Log in Create a free account