Code Challenges

Brian Sahota
4 min readDec 3, 2020

In my quest to get better at code challenges I found that there is actually such a thing as competitive programming. It’s considered a mind sport involving participants trying to program according to provided specifications. Here’s an example of a competitive code challenge problem I found.

Let’s say there is a tennis match. There is player A and player B, and every time they score they get a point. You need four points to win a game in tennis so let’s say your first list looks like this. [ A, B, A, A ] This mean that player A won the game and had 4 points to the opponents one. In tennis you need a certain amount of points to win a game, and a certain amount of games to win a set.You’re given the full sequence for the match and you need to be able to tell who won the whole match. How would you do it?

You probably have a solution. Of course if there is a tie at any point in tennis you would have to account for that in your solution, and it would probably take maybe ten minutes to code. Then you see that another competitive programmer did it in thirty seconds. How could that be you might ask. Well it’s about coming up with a simple idea really. Here the simple idea is that the winner of the entire match is whatever the last letter in the sequence is. The winner of a tennis match has never lost the final game of the match, they win it. Coding amiright.

Code challenges are supposed to be fun and help you become a better developer I hear. Yes, the feeling of a completed code challenge where everything works and you have twenty minutes left to think about how amazing of a coder you are does feel good. But then there are the other times where you just can’t think because you’ve had too much coffee.

The code challenge isn’t going anywhere though. The Flatiron School where I am currently attending love to give these tests out every three weeks. The junior dev position I will be applying to after school will absolutely be giving out code challenges as part of the interview process. The code challenge really is a showcase of how your mind works. It give you a measure to see how you can improve your ability to think logically in code and solve problems efficiently. Employers realize that a great developer does not need to be familiar with the stack that the company works with, they can just easily learn a new framework or a new language. And thank god because there is so much out there. In the end companies really search for programmers with excellent problem solving abilities.

So here are a list of fun resources that can help us all get amazing at code challenges.

Source AtCoder

Based in Japan, AtCoder offers weekly online programming contests. The contests are in Japanese and English and this is probably the most popular platform of its kind.

Visit site: AtCoder

Source hackerearth

HackerRank is an online platform where programmers from all over the world come to solve problems . HackerEarth is known for having conducted 1000+ hackathons and 10,000+ programming challenges to date. It also helps you create a sort of portfolio for job applications. Their online community is over 5 million!

Visit site: hackerearth

Source LeetCode

LeetCode is a website where software engineers can practice their coding skills. There are 800+ questions (and growing), each with multiple solutions. Questions are ranked by level of difficulty: easy, medium, and hard. There is a premium version as well which seems worth it. LeetCode is mentioned so often within the community.

Visit LeetCode

Source ProjectEuler

Project Euler is considered as one of the most popular coding challenge websites in the world. Project Euler attracts those who are primarily interested in mathematics and computer programming. There are over 700+ problems on Project Euler and they add every week.

Visit ProjectEuler

Source CoderByte

CoderByte is another popular one that helps its users improve their programming skills and provides useful courses for job interviews. It offers coding challenges in Javascript, Python, Ruby, PHP, Java, C, C++, and others.

Hope this helps!

Tell yourself this before every challenge

--

--