Reformat Date
Solve this the way you would in the interview: out loud, on a timer, with an AI interviewer asking follow-ups while you code. You get a scored report at the end.
Practice this as a mock interviewFree to start, no account neededProblem
You are given a date string in the form "Day Month Year":
- Day is one of "1st", "2nd", "3rd", "4th", ..., "30th", "31st" (standard English ordinal suffixes).
- Month is a three-letter abbreviation: "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec".
- Year is a four-digit year.
Return the same date as "YYYY-MM-DD", zero-padding the month and day to two digits. The input is always a valid calendar date.
Examples
Constraints
- The year is in the range [1900, 2100]
- The date is always valid
- `date` uses single spaces between its three parts
What the interviewer grades
A correct solution is one of five scores. The report also grades problem understanding (did you clarify inputs and edge cases before coding), problem solving, communication while you work, code quality, and testing. See a sample report, or read up on the pattern in the lessons.