Oct 30, 2019

Leetcode is an online algorithm competition website for interviewees to practice interview questions. It is also a very good place for newcomers to learn basic algorithms concepts and practice programming.



Leetcode provides a large number of algorithm questions for people to practice. To get started, choose a question and you’ll see a description of the question and some IO examples. If you click on discuss, you can see people sharing their answers to this question.


By scrolling down the page you’ll see a coding section which supports most of the common programming languages. There will be a time limit for your solution, so I would recommend using C++ since it is faster than most of the others. You will be asked to complete a subroutine that can carry out the functions mentioned in the question. Sometimes you are demanded to design a data structure instead. A template will be given to you anyway.


Submit the solution after you finish. The machine will automatically input several data sets or instructions to your subroutine (data structure) and examine the outputs. You can only gain an accepted when your program yields correct output all the time. Otherwise, you receive a wrong answer. If it takes too long time to finish, you receive a time limit exceeded. If you return extra results, you may receive an output limit exceeded.


After your solution is accepted (or you decide to quit trying), check others’ solutions and learn better ways to do the question. If you have time, find more questions on this website and practice.



Leetcode holds a weekly contest every Sunday. Four questions (usually from easy to hard) will become visible to competitors as soon as the contest begins. The form of questions is exactly the same as that in practice. Submitting the answers in a contest is also the same as submitting answers to practice questions, except you will have a 5-minute penalty for each wrong answer. The questions are supposed to be finished in following 1.5 hour. You can enroll/join the contest anytime before it ends, but you will lose some time if you join in after it begins.

You can try the virtual contest before taking part in an actual one. In a virtual contest, the rules are the same as a real contest except you can decide on the questions (from previous contests) and when to start.




You can learn algorithm concepts here. The tutorials include both interpretation and practice questions under which you can directly write code to practice.

There are also interview question sets provided for interviewees (usually requires a subscription to access), which is only useful to you if you are planning to get into a company.

Try out more interesting features on the website by yourself!

Raymond Wu

Founder and current leader of SCIE Programmers

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.