Day of the Week Problem
Day of the Week Problem — ExecCode Easy DSA Practice
Solve the Day of the Week problem on ExecCode. Free online easy DSA practice in Math. Write and run code in Java, C++, Python — no signup required to run.
Problem description
Description You are given a date, return the corresponding day of the week for that date. Your task is to compute the required answer and return the answer as one of the following values {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}. The input is given as three integers representing the day, month and year respectively. Note: January 1, 1971 was a Friday.
Examples
Input {"day": 31, "month": 8, "year": 2019}; Output Saturday. Input {"day": 18, "month": 7, "year": 1999}; Output Sunday
Constraints
The given dates are valid dates between the years 1971 and 2100.
Practice Day of the Week free on ExecCode. Browse DSA problems, topic map, and placement guides.