Skip to content
This repository was archived by the owner on Sep 18, 2020. It is now read-only.

mathismueller/CocoaheadsCodeGolf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cocoaheads turns X

This is a code golf challenge to celebrate the Xth birthday of the Cocoaheads Aachen Chapter 🎁🎉.

Clone the repository, implement public func isHeatWaveIncludedIn(waves w: [Int]) -> Bool, and create a pull request :). There are tests included to validate your solution and there is a Run Script Phase which writes the byte count of your implemention to CharacterCount.txt.

The challenge:

The Royal Netherlands Meteorological Institute defines a heat wave* as a series of at least 5 consecutive days of ≥25°C weather (“summery weather”), such that at least 3 of those days are ≥30°C (“tropical weather”). The tropical weather doesn't have to be measured consecutively: for example: 30, 25, 30, 26, 27, 28, 32, 30 is a 8-day long heat wave with 4 days of tropical weather.

*(Well, by Dutch standards.) Given a non-empty list of positive integers representing Celsius temperature measurements from successive days, decide whether that list contains a heat wave (as per the above definition).

The shortest answer in bytes wins.

The question was originally taken from: https://codegolf.stackexchange.com/questions/163188/detect-heat-waves

About

A Code Golf challenge for the Cocoaheads turns X event.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Swift 84.9%
  • Shell 7.9%
  • Objective-C 7.2%