The Calendar Sort
A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- easy
- Seniority
- L3
Problem
Given a list of date strings 'YYYY-MM-DD', return them sorted chronologically ascending. Since ISO format sorts correctly as strings, a lexicographic sort works. Do not use date libraries.
Summary
Time has its own opinion about order.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.