Leetcode 1185. Day of the Week
Given day, month, and year, determine which weekday that date falls on (one of Sunday–Saturday) by applying calendar arithmetic (e.g., Zeller's congruence) or a library routine, taking care of month/year adjustments and leap-year rules; dates are valid and lie between 1971 and 2100.
Asked at:
Microsoft
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Late December, 2025
Microsoft
Mid-level
Given a date, return the corresponding day of the week for that date. The input is given as three integers representing the day, month and year respectively. Return the answer as one of the following values {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}. Note: January 1, 1971 was a Friday.
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.