Assuming that by competitive coding, you refer to ICPC or time-bound coding contests, mastery of C++ with a basic knowledge of Java will get you through it.
Most competitive programmers prefer C++ over C because of the in-built functions associated with it. In C++, you can simply use sort(a, a+n) to sort an array a of size n, or use lower_bound(a, a+n, num) to binary search a number instead of writing the entire code (imagine the benefits in a time bound contest).
Moreover there are inbuilt data structures like vector (resizeable arrays), list, queue, stack, etc. in C++.
Java, albeit slower, has a powerful BigInteger, String Processing, HashTable and GregorianCalendar API.
Suppose you have to calculate the factorial of 25 (the answer has 26 digits), creating a C/C++ code from scratch will take time and effort, whereas a Java solution is this:
BigInteger fac = new BigInteger.valueOf(1);
for (int i = 2; i <= 25; i++)
fac = fac.multiply(BigInteger.valueOf(i)); // wow :slight_smile:
Bottomline: To actually excel in these contests, use better data structures and algorithms. No kidding. If you encounter a graph problem and you are not familiar with graphs, it doesn’t really matter which language you are using.
Note that you should choose language for your future work.
The languages with the topics are:
Game Developing: C++, C#
Desktop Application: C, C++
Android Application: Java, Python 3
If it helps you then give an upvote and Subscribe my youtube channel: CREATION TUBE.