/friday-thirteen

codeworks algorithm

Primary LanguageJavaScriptMIT LicenseMIT

Algorithm challenge // Valid Parentheses

1. Getting started

github.com/GelenaB/friday-thirteen

Fork this repo and then git clone your forked repo to your computer. Once happy with your solution, git push and submit a pull request at github.com/GelenaB/friday-thirteen or send an email to boldireg@tcd.ie

2. Challenge

Friday 13th is considered as unlucky day.

Write a function called unluckyDays that calculates how many Friday 13th are in the given year.

Your input year will be an integer. The function should also return an integer.

2.1. Examples

Input             =>  output
----------------------------
unluckyDays(2019) =>  2
unluckyDays(1998) =>  3
unluckyDays(1571) =>  1

2.2. Testing your solution

To test your solution, run npm install in the root directory and then run npm test to run the automated tests.

2.3. Submitting your solution

You have 2 options to submit your solution:

  1. If you're working on a forked repo, push your changes to your forked repo and submit a pull request to this repo
  2. Send an email with your solution to boldireg@tcd.ie and I will confirm