Skip to content

🟡 Port problem 6 (Zigzag Conversion) from Clojure to C++23 - #13

Open
AF2B wants to merge 2 commits into
chore/cpp23-migrationfrom
feat/cpp-0006-zigzag-conversion
Open

AF2B wants to merge 2 commits into
chore/cpp23-migrationfrom
feat/cpp-0006-zigzag-conversion

Conversation

@AF2B

@AF2B AF2B commented Sep 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Converts clojure/6.clj (and its clojure/input.txt fixture) to C++23 at solutions/0001-0100/0006-zigzag-conversion/.
  • The Clojure version didn't take the string as a parameter — it always read the same clojure/input.txt file regardless of numRows, so it wasn't a general solution to the problem. Replaced with the standard row-simulation algorithm taking (s, numRows) directly, verified against LeetCode's own published examples.
  • Removes both now-converted old files.

Base is chore/cpp23-migration (#4) — retarget to main once that lands.

Test plan

  • Verified locally with a standalone compile + assertions (no local CMake toolchain available on this machine).
  • CI (build & test, static analysis, format check) passes.

Replaces clojure/6.clj (and its clojure/input.txt fixture) with
solutions/0001-0100/0006-zigzag-conversion/.

The Clojure version didn't actually take the string as a parameter —
it always slurped the same clojure/input.txt file regardless of the
numRows argument, so it wasn't a general solution. Replaced with the
standard row-simulation algorithm that takes (s, numRows) directly,
verified against LeetCode's own examples.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants