Count Connected Components Leetcode Problems Sql