Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/andreoss/water-collected-in-pits

Water collected between hills
https://github.com/andreoss/water-collected-in-pits

algorithms java-19 programming-tasks

Last synced: 5 days ago
JSON representation

Water collected between hills

Awesome Lists containing this project

README

        

# Four solutions to a trivial problem
[![build](https://github.com/andreoss/water-collected-in-pits/actions/workflows/maven.yml/badge.svg?branch=master)](https://github.com/andreoss/water-collected-in-pits/actions/workflows/maven.yml)

A Java 19 implementation of the solutions from Guy Steele's
talk "Four Solutions to a Trivial
Problem" (https://www.youtube.com/watch?v=ftcIcn8AmSY)

## Problem

There is a landscape with hills and pits which have similar square shape.
Each position in this landscape has a specified height.

When rain happens, landscape is filled with water. Water is collected
inside pits only.

This project provides all three solution mentioned in the talk.

## Build

```
mvn clean install
```