Requirements of the LeetCode API
Understand the functional and non-functional requirements for the LeetCode API service.
Introduction to LeetCode API
LeetCode is a service that enables software developers to improve their programming abilities and put them to the test. While practicing programming, we need to evaluate our solutions. In this chapter, we aim to design an API for LeetCode that will allow users to attempt to solve many problems and verify their solutions’ correctness. If they’re unable to solve a problem, the API can provide them multiple solutions. Our API will include functionality to conduct programming contests where programmers participate to showcase and highlight their skills.
Finally, we will incorporate a discussion feature as part of the API that enables users to talk about general issues and interview experiences as well as propose solutions to programming problems. The API also provides a feature for users to conduct interviews to hire potential talent.
Requirements
LeetCode API offers various services to the users, and as a result, the functional requirements increase. To keep the scope of this design problem tractable, we will limit our functional and non-functional requirements to the following.
Functional requirements
List questions: The API should allow users to list practice problems by selecting a difficulty level or searching for a topic.
Register contest: The users should be able to register for contests they want to participate in.
Submit code: The users practicing or participating in contests should be able to submit one or multiple solutions for evaluation.
Leaderboard: A contest's result is generated as a leaderboard. Participants must be allowed to fetch the leaderboard to analyze results.
History: A user should be able to track their performance metrics, submitted solutions, and results of contests.
Interview: Users or companies should be able to interview candidates using the LeetCode API.
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy