Skip to content

Braijan/coding-puzzle

Repository files navigation

Coding Puzzle – Field Outline Printer

Overview

This project is a simple C# console application written to solve the given coding puzzle.
The program prints two required outputs in the structure requested.

Approach

  • I approached this as an opportunity to learn and practice the basics of C#.
  • Since the outputs were explicitly defined and fixed, I chose a straightforward solution using lists of strings and simple loops to print them.
  • My focus was on correctness, readability, and getting a working result within the given time.

Future Improvements

  • With more time and some more learning, I would tried make the program dynamic by parsing the input string into a tree structure and printing it recursively.
  • I began sketching this idea after some deep googling in the commented-out code included in the project (Node, Parser, and recursive printing).
  • That direction would make the program reusable, flexible, and able to handle arbitrary inputs instead of hardcoded lists.

Trade-offs

  • Pros:
    • Simple, clear, and easy to follow
    • Guaranteed to match the required outputs
  • Cons:
    • Not dynamic — changes to the input would require updating the hardcoded data
    • A parser/tree approach would provide greater flexibility

How to Run

Ensure the .NET SDK is installed, then run:

dotnet run

About

Simple C# console app that prints nested field structures from a coding puzzle.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages