This document contains code to check if a graph contains a cycle using union-find algorithm. It first creates a graph with vertices V and edges E. It then initializes a parent array to track subset membership. For each edge, it finds the subset of the source and destination vertices. If they are in the same subset, there is a cycle. Otherwise, it does a union of the subsets. It returns 1 if a cycle is found, 0 otherwise.