Skip to content

feat: add domino & tromino tiling using dp#3152

Open
Hxrshthetic wants to merge 1 commit into
TheAlgorithms:masterfrom
Hxrshthetic:domino-tromino-tiling
Open

feat: add domino & tromino tiling using dp#3152
Hxrshthetic wants to merge 1 commit into
TheAlgorithms:masterfrom
Hxrshthetic:domino-tromino-tiling

Conversation

@Hxrshthetic
Copy link
Copy Markdown

Description of Change

This PR adds an implementation of the 2 x n domino and tromino tiling problem using dynamic programming.

The solution uses the recurrence relation:
F(n) = 2 * F(n - 1) + F(n - 3)
to compute the number of ways efficiently in O(n) time.

The implementation includes proper Doxygen documentation and self-tests using assert to verify correctness.

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • Added documentation so that the program is self-explanatory and educational - Doxygen guidelines
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes: Implements an efficient DP-based solution for domino and tromino tiling with full test coverage.

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.

1 participant