6 kyu

Most Frequent Weekdays

1,468 of 3,650suic

Description:

What is your favourite day of the week? Check if it's the most frequent day of the week in the year.

You are given a year as integer (e. g. 2001). You should return the most frequent day(s) of the week in that year. The result has to be a list of days sorted by the order of days in week (e. g. ['Monday', 'Tuesday'], ['Saturday', 'Sunday'], ['Monday', 'Sunday']). Week starts with Monday.

Input: Year as an int.

Output: The list of most frequent days sorted by the order of days in week (from Monday to Sunday).

Preconditions:

  • Week starts on Monday.
  • Year is between 1583 and 4000.
  • Calendar is Gregorian.

Examples (input -> output):

* 2427 -> ['Friday']
* 2185 -> ['Saturday']
* 2860 -> ['Thursday', 'Friday']
Fundamentals

Stats:

CreatedMar 17, 2016
PublishedMar 17, 2016
Warriors Trained11684
Total Skips1208
Total Code Submissions17518
Total Times Completed3650
Python Completions1468
Ruby Completions193
JavaScript Completions973
C# Completions326
Scala Completions71
Java Completions327
Groovy Completions26
F# Completions22
CoffeeScript Completions6
VB Completions25
Go Completions116
TypeScript Completions94
Haskell Completions20
Raku Completions12
Rust Completions64
COBOL Completions2
C Completions18
Total Stars251
% of votes with a positive feedback rating90% of 599
Total "Very Satisfied" Votes495
Total "Somewhat Satisfied" Votes88
Total "Not Satisfied" Votes16
Ad
Contributors
  • suic Avatar
  • GiacomoSorbi Avatar
  • smile67 Avatar
  • imjasonmiller Avatar
  • user5036852 Avatar
  • hobovsky Avatar
  • trashy_incel Avatar
  • akar-0 Avatar
  • KayleighWasTaken Avatar
  • saudiGuy Avatar
Ad