Skip to content

This repository contains C++ code for a string construction algorithm. The algorithm calculates the minimum cost to construct a target string by either appending characters or cloning substrings. The code includes a test program with sample test cases.

Notifications You must be signed in to change notification settings

codex-newton/string-construction-algorithm

Repository files navigation

#String Construction Algorithm

This repository contains C++ code for a string construction algorithm. The algorithm calculates the minimum cost to construct a target string by either appending characters or cloning substrings. The code includes a test program with sample test cases.

Files

  1. stringConstruction.h: Header file containing the function declaration.
  2. stringConstruction.cpp: Implementation of the string construction algorithm.
  3. TestStringCons.cpp: Test program with sample test cases.
  4. testStringCons: Executable file generated from the code.

How to Use:

Compile the code using a C++ compiler (e.g., g++). Run the compiled executable (./testStringCons).

About

This repository contains C++ code for a string construction algorithm. The algorithm calculates the minimum cost to construct a target string by either appending characters or cloning substrings. The code includes a test program with sample test cases.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages