Databricks interview question

DSA Rounds they asked questions on Graph, on Union Find to be precise.