Showing posts with label competitive programming books. Show all posts
Showing posts with label competitive programming books. Show all posts

Thursday, July 25, 2019

how to prepare for competitive programming


competitive programming from beginner to expert


competitive programming from beginner to expert

Hi, I guess you were a student recently came across this weird term competitive programming but don't know from where to start your programming journey so don't worry you were at right place here I will give you step by step guide to start with so let's gear up for the battlefield ......


competitive programming

competitive programming roadmap


➤ step 1: as a beginner first of all pick at least one weapon.
 here, weapon means a programming language :
choose any (C, C++, Java, Javascript, Perl, Python) or a combination of many.
      
so,         
     if you choose C then switching to C++ is easier for you.
     else if you choose java then javascript is easier for you.
     else choose python.
       
I personally prefer C++ because it is fast and the majority of the programming community uses it.
so it is easier to find a solution to a problem plus it is fastest among all languages.

➤ step 2: just learn these basic things in any of the programming language you choose...

  • use of data types
  • arrays
  • lists
  • dynamic array
  • while and for loops
  • if and else statements
  • a motivated brain
    


 step 3: go to HackerEarth navigate to basic programming and explore the platform don't worry at first you get some unknown errors and you didn't even understand the given programming problem language but with the time of 2 or 3 days, you have a fair idea what the hell is going on.

 step 4: ok if you have followed all the three steps mentioned above then you have been encountered with either of these errors.

runtime error:


➢ this error occurs if you have declared an array of size smaller then required.
to solve this take array size larger like ar[1000000]

compilation error: 


➢ the online platforms use standard compilers like GNU g++ for c and c++

➢ the java,c and c++ users  don't miss out semicolons ' ; ' or curly brackets '{}'.

➢ the lovers of python don't forget that python 2x and 3x are different so choose carefully. 

➢ c++ users don't use #include<iostream.h> insted use #include<iostream>.

time limit exceeded:


➢ it's possibly because you use an infinite while or for loop so keep an eye on what conditions you are using.

➢ the second reason may be your Internet speed is slow.

 step 5: don't forget to learn and practice the functions like...

  • sort
  • reverse
  • swap
  • gcd
  • permutation
  • binary search
  • max, min
  • pow
expert advice: to use these functions without including tons of libraries just use one i.e #include<bits/stdc++.h>
please buy a good laptop see HOW TO FIND BEST LAPTOP

 step 6: till now you get well acquainted with the HackerEarth platform now move to the data structure section and start learning different data structures and solve the problem related to them I mention the best book below which I personally prefer.


 competitive programming books I Used


 Data Structures and Algorithms:     click here


➦ Crack MNC(google/Facebook):    click here
  





➤ step 7: when you get well acquainted with the data structures go and learn different algorithms to solve problems faster.

➤ step 8: now you have passed the journey of competitive programming from beginner to expert
it's time to explorer different platform like hackerrank, CodeChef, code forces, etc and take part in different competitions like hackathons by HackerEarth and breakfast, lunch by CodeChef and earn some real money and also code vita which gives you money as well as a job.




Bonus tip:  learn data structure and algorithm well because it is the main key to master the coding competition and it is also included in your B.tec/Bca/Mca syllabus so score well in the exam as well. 

hope you like this article Feel free to comment on the topic you find difficult, be it data structure, algorithms anything tells us we will try to write an article on it in a very easy and understandable way.

If you love the post please subscribe to my Youtube Channel

Good Luck!




Everything Need To Know About BATTLEGROUNDS MOBILE INDIA

 BATTLEGROUNDS MOBILE INDIA  Finally, Krafton unveiled India’s beloved battle-royale game PUBG Mobile, but with a new name – Battlegrounds M...