Design an online coding contest platform that supports programming competitions, code submission, automated judging, and live leaderboards.
The platform should support:
-
User registration and contest participation.
-
Problem statements, test cases, and scoring rules.
-
Code submissions in multiple programming languages.
-
Secure code execution in an isolated sandbox or container.
-
Real-time or near-real-time leaderboard updates.
-
Tracking the current status of each submission, such as queued, running, accepted, wrong answer, time limit exceeded, runtime error, or system error.
Deep-dive areas:
-
How would you scale the code judging system as submission volume grows?
-
How would you scale the database and leaderboard storage?
-
How would you track and expose the current state of each code-judging job?