7 kyu
Extended weekends
320 of 837KenKamau
Description:
If the first day of the month is a Friday, it is likely that the month will have an Extended Weekend
. That is, it could have five Fridays, five Saturdays and five Sundays.
In this Kata, you will be given a start year and an end year. Your task will be to find months that have extended weekends and return:
- The first and last month in the range that has an extended weekend
- The number of months that have extended weekends in the range, inclusive of start year and end year.
For example:
solve(2016,2020) = ["Jan","May",5]. //The months are: Jan 2016, Jul 2016, Dec 2017, Mar 2019 and May 2020
More examples in test cases. Good luck!
If you found this Kata easy, please try myjinxin2015 challenge version here
Fundamentals
Similar Kata:
Stats:
Created | Nov 11, 2018 |
Published | Nov 11, 2018 |
Warriors Trained | 3590 |
Total Skips | 105 |
Total Code Submissions | 2786 |
Total Times Completed | 837 |
JavaScript Completions | 320 |
Haskell Completions | 22 |
Python Completions | 309 |
Ruby Completions | 41 |
Java Completions | 131 |
C++ Completions | 53 |
Total Stars | 53 |
% of votes with a positive feedback rating | 85% of 200 |
Total "Very Satisfied" Votes | 157 |
Total "Somewhat Satisfied" Votes | 27 |
Total "Not Satisfied" Votes | 16 |
Total Rank Assessments | 4 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |