LeetCode
Type of site
Online judge
HeadquartersCalifornia, U.S.
IndustryInternet
ServicesOnline employment
URLwww.leetcode.com
CommercialYes
RegistrationOptional
Current statusActive

LeetCode

edit

LeetCode is a social platform and online judge intended to prepare users for programming interview questions. The primary component of the site is an interface where users can submit solutions to a database of problems that will be verified for correctness by the judge. The website currently contains three types of problems: algorithm, database, and shell. Problems are accepted in C++, Java, Python, C, C#, Javascript, Ruby and Swift.

Problems

edit

The majority of problems on LeetCode fall into the algorithm category with 335 existing problems.[1] Algorithm problems test the user's ability to write code in traditional programming languages. In contrast, database and shell problems test the user's ability to write SQL and shell script code, respectively. The problems vary in difficulty ranging from Easy, Medium to Hard. The acceptance rate (the percentage of solutions accepted) is also displayed for each problem and ranges from 10% to 50% depending on the difficulty of the problem.

The website provides an IDE for users to write their code. The user can choose to provide a test case on which to run their solution or submit their solution to the online judge, where it will be tested for correctness using the judge's test cases. Upon submission of a problem, the execution time of the user's submission is ranked among other submissions in the same language. The user can then view the percentile of their execution time, and the distribution of execution times for the problem.

Some problems have editorials written for them, which are official explanations for the solutions.[2]

Discuss

edit

The Discuss section of the site is a forum in the same style as Stack Overflow. The most common tag in the forum is "solution-sharing" with over 11,000 posts compared to the second most popular tag "java" with 5,000 posts.[3] Users can ask questions, share their own code or discuss possible solutions. Each problem has its own page, which is accessible from the problem statement page.

Course

edit

The course section of the site, LeetCode 101, offers examples and tutorials for concepts commonly found in programming interviews. The tutorials are divided into eight sections: array and string, linked list, trees and graphs, math, hash table, binary search, dynamic programming and sorting.

Mock

edit

On January 24 2016, LeetCode launched Mock Interview: a feature meant to simulate a live programming interview.[4] The user is presented with an interview question and must solve it under a time constraint. At the end of the interview, statistics are shown giving users an idea of their percentile in terms of solving time.

Premium and E-Book

edit

The site offers a premium membership that unlocks several questions that are unavailable for regular members.[5] Information about the companies which have asked specific questions is also available. An e-book is available for purchase on the site containing the problems and their solutions.

References

edit
  1. ^ "Problems | LeetCode OJ". leetcode.com. Retrieved 2016-03-07.
  2. ^ "LeetCode Articles". Retrieved 2016-04-07.
  3. ^ "Most popular tags - Leetcode Discuss". leetcode.com. Retrieved 2016-03-07.
  4. ^ "LeetCode Facebook Timeline". www.facebook.com. Retrieved 2016-03-07.
  5. ^ "Choose a Subscription". leetcode.com. Retrieved 2016-03-07.