/union-street-swift

Drop-in Union Find data struct for Leetcode problems written in Swift

Primary LanguageSwiftMIT LicenseMIT

CI-macOS

Union Street

Union Street is Drop-in Union Find data struct for Leetcode problems written in Swift

Grad it here: UnionFind.swift

Problem

Union Find algorithm that I often has to write from scratch myself for Leetcode solutions. I have seen Union Find being implemented in a form of struct or class instead of inline functions with two arrays. This project exists so one can quickly copy-and-paste a UnionFind data structure to a [Swift] Leetcode solutions.

Goals

  1. Simple AF
  2. Tested

Leetcode

Problems that can be solved with Union Find data structure.