From a23e62507ef2fc739595c4670c43b6f95f6f31f9 Mon Sep 17 00:00:00 2001 From: unnsse Date: Sun, 4 May 2025 00:28:55 -0700 Subject: [PATCH] - Revised readme --- README.md | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index c03da33..d53815a 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ to identify connected components. Each bounding box is defined by the minimum and maximum `x` and `y` coordinates (with 1-based indexing) that surround a connected group of `*` characters. +See detailed article: [2D Matrix Bounding Box Checker Using DSU and Union-Find in Java 23 Using TDD](https://unnsse.io/2025/05/boundingbox_05032025) + ### Example Input ```txt @@ -26,14 +28,22 @@ Each bounding box is defined by the minimum and maximum `x` and `y` coordinates ## Features -• Detects all connected components of `*` characters using Union-Find. +• Reads input text file containing 2D grid from `stdin`. + +• Detects all connected components of `*` characters using Disjoint Set Union-Find (DSU). + +• Calculates bounding box coordinates during the find-union phase. • Computes the minimum bounding box for each component. • Filters for the largest non-overlapping bounding box. +• Filters and compares boxes using area and coordinates. + • Optionally returns all non-overlapping boxes in sorted order. +• Returns empty string if no valid boxes found. + • Handles malformed input with a clear "Error" output. • Efficient for large grids (10,000 × 10,000). @@ -42,16 +52,6 @@ See [Requirements.md](Requirements.md) for more details. --- -## Design/Implementation - -• Uses a Union-Find (DisjointSet) to track connected components of `*`. - -• Calculates bounding box coordinates during the find-union phase. - -• Filters and compares boxes using area and coordinates. - ---- - ## Machine / Target Environment Local / target machine should have the following software installed: @@ -103,12 +103,4 @@ new BoundingBox().largestNonOverlappingBox(lines, true); --- -## Article/Blog Entry - -Wrote detailed article about this experience in my blog: - -[2D Matrix Bounding Box Checker Using DSU and Union-Find in Java 23 Using TDD](https://unnsse.io/2025/05/boundingbox_05032025) - ---- - Feel free to fork and/or add to this!! :smile: :coffee: \ No newline at end of file