Useful Coding Practice
10 Nov 2019
I’ve come across a couple of websites that offer useful practice in terms of coding:
Project Euler website has many problems that have a strong mathematical bent. Some example problems include tasks such as:
- Find the 10001st prime number
- Find the largest prime factor of a number
- Find the sum of all amicable numbers less than 10,000
What I like about these problems is that you have to code solutions that will execute in a realistic amount of time. According to the website, a properly coded solution to a problem should run in about one minute on modern computer. In some of the trickier problems, the challenge is finding math or other shortcuts to get the problems into a time complexity that is solvable.
If you find a solution to the Project Euler problem, be sure not to share it online! That would take away some of the fun from someone else trying to solve it!
Be careful though, if you make an account be sure to generate an account recovery key. The website does not have a find username feature, or find password feature. So if you lose your login credentials your account will be lost. You can make a backup key by going to the Account tab and clicking “Generate Recovery Key”; I suggest emailing the key to yourself for backup.
LeetCode is another website with coding challenges. The coding problems on LeetCoding are much more computer science oriented, offering problems in algorithms, database, shell, and concurrency. One of the really nice features of this site is the interactive coding environment that they run split-screen next to the problem description. All you have to do is enter the necessary code, and then you can run the code with preassigned inputs that will check your solution. You can also provide other test cases as well!
In addition to coding problems, there is also a space for discussing interview experiences as well. The discussion board consists of interview questions, experiences, compensation and more. Great source of information.
They also have a feature called “Mock” that allows you to do an example job interview with “actual” questions from employers. Definitely worth checking out!
I’m sure there are many coding challenge websites that are out there, and when I find more I’ll be sure to add them to this list. Please email me any challenges you think are interesting as well!