Competitive Programming is a sport. Consider a programming contest as a contest. Write a piece of code that should satisfy the problem presented and submit, you may get a WA (Wrong Answer). Make variations to code and eventually you will get your precious AC (Accepted/Correct Answer).
Here is how you can master Competitive Programming:
Choosing the right language:
The first step to take is to choose the right language to start your competitive journey with. You may try new languages and even find some other language suiting you better. The commonly used and recommended languages are:
Python: It is one of the easiest to learn language and has very simple syntax to implement. It has wide usage in domains like Machine Learning, Artificial Intelligence and Data Science if you decide to explore that domain.
Java: It is a very highly recommended language by coding communities. It is one of the most preferred languages for competitive programming and easy one.
JavaScript: It is the most popular scripting language and a staple of web-development. Many popular websites like Facebook, Twitter, YouTube, and Gmail use JavaScript to create interactive web pages and flexibly show content to users.
C: It is based on POP (Procedural Oriented Programming) where it divides programs into small functions.
C++: It is the most popular and recommendable programming language. C++ template includes data structures like Lists, Tree, Stacks, Graphs, Arrays etc. It follows OOPS (Object Oriented\ Programming) which help you to solve real time coding challenges.
Go: It is a low level language, open-source language preferential by Google. Useful to build web servers, data pipelines etc.
Ruby: It is an object-oriented language, user friendly, easy to learn. Dynamic Programming Language and also based on other programming languages like Perl, Lisp, Ada, Eiffel etc. It is used for Web Applications, Database Solutions and Data Science etc.
And many more. Once you learn any language, start practicing it. You can practice these languages from any website (I recommend Hackerrank). You can find these websites from search engines. Practice as many questions as you can and once you get confident about it you can go further.
Learning DSA:
After getting a grip in Programming language, now you can start
learning **Data Structure and Algorithms **with its application. To solve any problem or to crack any competitive programming, proficiency of syntax alone is not sufficient.
You should have knowledge about Data structures concepts and algorithms and its types with its implementation to solve real life problems.
Data Structure: Organising data and converting it to a well
structured one. Here is the list of Topics of Data Structure:
Arrays
Linked Lists
Stacks
Queue
Hash Tables
Tree
Heaps
Graphs
Whereas For algorithms, You should know following concepts with its application:
Searching Algorithm
Linear Search
Binary Search
Jump Search
Interpolation Search
Exponential Search
Ternary Search
Sorting Algorithm
Selection Sort
Bubble Sort
Quick Sort
Radix Sort
Merge Sort
Cycle Sort
Heap Sort
Bucket Sort
And a variety of others.
Practice Practice Practice:
Once you understand the techniques of solving the problem then below are some of the good sources of practicing competitive programming
LeetCode: Leetcode has a wide variety of problems that can be easy, medium, and Hard. Its advised to start solving Low and Medium problems and then gradually move to Hard Problems.
CodeChef: CodeChef doesn't need any introduction. This platform contains advanced competitive problems. It's better you don't directly jump to Codechef. Instead start with Leetcode and once you can solve their hard problems easily then gradually move to Codechef.
Top comments (0)