It is fun and fruitful to participate in coding challenges and hackathons offline or online. There are lots of prices and incentives that you can win in these contests. You can showcase your skill and get awarded for it. Hackathons are generally held for 1 to 7 days or a fixed period of time, similar for coding challenges. The one thing that you must have come across is that you have to finish your code in the limited amount of time. Unless and until you compete efficiently and have a time management you will get outrun by the other challengers. You must work on different techniques to speed up your coding. You have to present your work correctly and in less time too.
Great coders & developers are highly reliable. They estimate the time needed to complete the task, communicating this and delivering on time.
These are some of the tips that you can follow to save your precious time while competing in a coding contest:
- Read the questions properly twice or thrice : There are many loopholes set by the problem setter for the user to be trapped in. You have to escape through all of these loopholes. Unless and until you read the question twice or thrice you might get into trouble and you will lose your precious time in thinking what went wrong and correcting those errors. You can refer to this link to know how to read competitive programming questions
This article is written by me and it helps the reader to know how to read and attempt a coding question and improve his programming skill.
- Think and compile : Sometimes you won’t get the program right in just one attempt so you must be patient to know all the errors that you have done, you can’t just remove an error and compile again. You have to go through the whole program again and analyze it correctly and stop wasting your limited time.
- Upgrade your logic and understanding : You can run code from other efficient coders so that you can have an idea of what can be done using coding and how it can be implemented faster and more logically. The program which you compiled in 100 lines of code, might have been compiled by some other efficient coder in 50 or fewer lines which saved him time for attempting other coding questions. It might have also taken less time to get the output through his code. Keep learning from other great programmers.
- Find and learn to use tools and languages efficiently : Every language has new features for coders and developers to use and implement which makes their code more efficient. Discover these new commands, filters, and functions that can be used to solve a problem. Learn how to use it because developers who don’t really know their tools waste a lot of the time in debugging and rewriting their code.
- Have a creative coding atmosphere : Get ready with your tools before the competition because you might lose your innumerable seconds just because of some silly stuff like your net might not be connected, your browser is not working properly and so on. You might also get distracted due to these errors and cannot work on your logic. Plan out everything before you sit to conquer the challenge.
- Keep growing : There is always room for improvement even after following these techniques. Don’t be stagnant. Keep improving and practicing day by day.
Above techniques are my learning and point of views. You can suggest more techniques in the comment section which you have come up with by your self-learning and based on your programming experience. I hope you save some seconds the next time you code.
Related Articles :
- BFS using STL for competitive coding
- Practice for cracking any coding interview
- Python Tricks for Competitive Coding
- Why is python best suited for Competitive Coding?
- Different types of Coding Schemes to represent data
- Pattern Printing question asked in CGI Coding Round
- CSS | animation-timing-function Property
- Count of strings whose prefix match with the given string to a given length k
- Reorder the position of the words in alphabetical order
- Number of character corrections in the given strings to make them equal
- Top 10 Reasons to Learn Java
- Method Overriding in Scala
- Check if string can be made lexicographically smaller by reversing any substring
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.