only the word is enough to put a spark in every computer science student’s eyes. It is the latest fad among college students and a need of the hour for developers in almost every domain. In my opinion, it’s a sport.
But, When, Where, and How to start, What is an Online Judge ( is it an actual human ? ). These are the first thoughts that come into every beginner’s mind when for the first time he/she dives into this world of competitive programming ( or should I say Multiverse), I will be answering in this article:
Frankly speaking, in India, a person gets to know about competitive programming in the 1st/2nd year of college, and I feel that it’s quite late as compared to the world wherein Western and European countries it is a common subject at school levels.
As soon as you got to know about it because everyone else you will compete with had already done it before. But till when?
There are two kinds of people out there
So decide yourself when you want to do it but starting early has always ended up being fruitful.
[su_note note_color=”#f5f5d4″ radius=”6″]| Also Read | A Guide for new comers to Artificial Intelligence[/su_note]
There are so many online resources for this and some great books too. Some of them are:
But, for a beginner, it is more important to know how to start on any one of these like, what is a problem, where to write a solution, and in which language? Almost each of these listed above supports every popular programming language like C, C++, Java, Python, Javascript, etc. To learn to code for kids recommended geekedu platform.
There is a problem statement given that explains the input, output formats, and what functionality needs to be satisfied by the program. You need to submit the program that accepts the input in the specified format and do something that outputs in a given format, only.
Now, coming to that “do something” part I mentioned in the above line.
One needs to think of the algorithmic approach to reach the solution not for just one, but for all and universal inputs. By that I mean think about all possible input domains and then form a strategy common to all of them to reach the specified output. This needs both logical thinking and a lot of practice. Observe the problem statement and compare input and output for some easily thinkable cases. Then go for the corner cases that define the problem.
Here is a link to some beginner level solutions to Hackerearth problems that I wrote in the 2nd year of college, after getting a list of errors for straight 3-4 months. Most of them are in C as it was my first programming language and the rest are in Python3, my present language.
Now the good part of these solutions is that they use a naive and easier approach, not like the straightforward approach explained in an editorial solution of these. For example, for the problem “PrimeStrings”, I had written a basic, first thought-based solution to it, that a beginner could think of. Instead, when now I look back at it, I feel I could have optimized or shortened the code by using data structures like “set” and “dict”, but these things don’t strike on the first try.
[su_note note_color=”#f5f5d4″ radius=”6″]| Also Read | WordPress – Build personal Blog/Site in muinutes[/su_note]
It is also a program that evaluates your code with respect to given problems and constraints. It already has both the input and output files that will be used for testing. Now when your program is made to run on those input files, it generates some output files w.r.t your code. Now, these are matched with the correct output files, present on the server. Based on this, you get a response that whether your solution was correct or not. Learn to make the online judge your friend and know the error it is throwing at you. It will help in debugging the program.
Whenever stuck on a problem, just don’t give up and keep trying to approach it differently.
[su_note note_color=”#f5f5d4″ radius=”6″]| Also Read | Make music with Programming[/su_note]
Happy Coding!
This post was last modified on July 16, 2022 2:43 pm
Struggling with a locked Samsung Galaxy or Note smartphone? Remove KG Lock, a U.S.-based company,…
When you open Adobe Photoshop for the first time, it's easy to click around in…
Social Media Influencer apps for mobile With the increasing number of social media platforms and…
Microsoft Dynamics 365 is a suite of Business Applications from Microsoft that covers the traditional…
While torrents and peer-to-peer (P2P) file sharing have long been popular for data transfer, concerns…
In today's increasingly interconnected world, reliable communication is paramount. But what happens when emergencies strike…
This website uses cookies.
Leave a Comment