Skip to content

andreoss/water-collected-in-pits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Four solutions to a trivial problem

build

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