What is the best language for Competitive Programming? For example, out of C, C++, Java, and Python, which would be the best language to specialize in for programming competitions?
C (to be more specific C++)
You read it right "C++" not "Python"
"JAVA" : No need to mention
( JAVA - codes are much lengthier to type than "C++" and "Python" )
So who want to type much and also if you are exception then time is always a factor in competitive coding.
Most of you have heard Python to be very elegant language with minimal syntax to be typed..
Then why C++ ?
- For so called competitive coding. If you are not best in competitive coding, you will not get chance to showcase your other languages as Python and JAVA. All projects will be wasted. Even if your github is glorified with projects then how will you bring them to recruiter's notice. The only way is competitive coding. Other languages ( Python and JAVA ), github projects will only pay off when you will get shortlisted for interviews which is through coding round ( By coding, I again mean competitive coding). And in interviews too, 1st and foremost criteria is competitive coding. Other languages ( Python and JAVA ) and github projects, all are secondary.
- On the basis of competitive coding, top - notch mnc's :- GOOGLE, FACEBOOK, AMAZON etc recruit .
- You may cross - validate 2nd point by referring "How we hire - Google Careers", there you will come across the importance of excellence in competitive coding for Google recruitment. Now, why C++ better for competitive coding than Python and JAVA :
- Order of RUN - TIME :- Python > JAVA > C++ > C
- From 4th - point, it's evident that "C" and "C++" (as they are compiler based languages) take least run-time while "Python" (being interpretor based language ) take most run - time. "JAVA" is also compiler based yet it is relatively slower than "C" and "C++".
- Competitive coding, have "run time" and "memory" constraints, your program must run within " 1 - sec" on most of " online competitive coding - websites" except for "CODEFORCES" and "TOPCODER" which have " 2 - sec" run - time constraint. So here come 4th and 5th points in scenario, that "C" and "C++" take least run-time while "Python" most.
- Due it's predefined containers & standard-algorithms present in standard template library (STL) which are great life - guards which rescue you to fathom some unconquerable problems, saving lot of time of thinking and typing those algorithms. And time is factor why I am not at all talking of "JAVA"
One must start learning "C++" as early as possible and make competitive coding your life until somewhere around 4th /5th semester, for interns, which are solely based on competitive coding.
As intern recruitments are in 5th - semester, so by then you will accomplish proficiency in competitive coding.
"C++" for campus placements only.
Now comes contrary part :-
( Projects have to be thought after 4th /5th semester)
See, as there not any issue of run time constraints contrary to competitive coding.
And you have to code tremendous amount of lines relative to competitive coding.
So for projects,
1. Most programmer-friendly language with most elegant syntax which is minimal for typing.
2. For Machine Learning and Data Analytics
3. And if you have made your mind for web development project. Due to "DJANGO".
For all JAVA lovers, I will give respect to JAVA also :-
- For object oriented software development.
2. If you have made your mind for "APP - DEVELOPMENT" :-
App Development = JAVA ( Backend ) + XML ( Frontend )
You can get videos to learn the maths of machine learning, machine learning algorithms, how to think and implement projects by subscribing and turning on notifications of following youtube channel :-