User:Duncanc/sandbox

= LeetCode = 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
The majority of problems on LeetCode fall into the algorithm category with 335 existing problems. 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.

Discuss
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. 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
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
On January 24 2016, LeetCode launched Mock Interview: a feature meant to simulate a live programming interview. 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
The site offers a premium membership that unlocks several questions that are unavailable for regular members. 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.