Skip to content

Java/Gradle project for the Pyramid Problem. Includes data models, a naïve solver to be corrected, and a space for implementing an optimized solution with unit tests.

Notifications You must be signed in to change notification settings

Dhushy/pyramid-problem-solution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pyramid Problem

Java/Gradle project for the Pyramid Problem. Includes data models, a naïve solver to be corrected, and a space for implementing an optimized solution with unit tests.

Prerequisites

  • Java 21
  • Gradle

Project Structure

All classes are in com.ncr.test.pyramid and its subpackages.

Main Packages

  • com.ncr.test.pyramid
    Contains main classes for running OurProgram (naïve solver) and YourProgram (optimized solver).

Subpackages

  • data : Data model classes and factory classes
    • impl : Implementation of interfaces
  • solver : Solution classes for the given tasks
  • utils : Utility classes (helper functions, nothing critical for the assignment)

Tests

  • Tests mirror the structure of the main project.
  • NaivePyramidSolverTest : Task 2 unit tests
  • YourSolverTest : Task 3 unit tests

Tasks Overview

  • Task 1: Update build.gradle and settings.gradle for JDK 21.
  • Task 2: Fix com.ncr.test.pyramid.solver.impl.NaivePyramidSolver (recursive solution).
  • Task 3: Implement optimized solution in com.ncr.test.pyramid.solver.impl.YourSolver.

How to Run

# Run Naive solver
./gradlew runNaiveSolver

# Run Optimized solver
./gradlew runYourSolver

About

Java/Gradle project for the Pyramid Problem. Includes data models, a naïve solver to be corrected, and a space for implementing an optimized solution with unit tests.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages