Sprinklr interview question

A question on Disjoint set union and from Operating system.