From b05aca70a92f7922b4795e3c2bcaaf7aac3c4617 Mon Sep 17 00:00:00 2001 From: Tom Conder Date: Mon, 15 Sep 2025 01:26:21 -0500 Subject: [PATCH] Enhance README.md with project overview and algorithm details --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 219c595..7ba6ba3 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,18 @@ # linebreak -A simple app to demonstrate line-breaking algorithms. +A Go library demonstrating line-breaking algorithms with optimal text formatting. + + +## Overview + +This project implements two line-breaking algorithms to format text within specified width constraints: + +- **Greedy Algorithm**: Fast, simple approach that fits as many words as possible on each line +- **Knuth-Plass Algorithm**: Sophisticated dynamic programming solution that optimizes line breaks based on penalty functions ## Features +- **Multiple Algorithms:** Choose between greedy and Knuth-Plass line breaking - **Dynamic Programming:** Efficiently computes optimal line breaks. It uses a penalty for trailing spaces to promote balanced text. - **Unit Tested:** Includes unit tests to ensure quality and to allow future changes with confidence.