Sunday 20 November 2016

What all languages I should know to be good at Competitive Programming?

The most frequently asked question by the newbies. The answer to this being perfect in any one of the languages of your interest will solve the problems in Competitive Programming. Almost all languages supported by the online judges.

Still recommendation will be any of the one below-

  1. C++
  2. JAVA
  3. C
JAVA is recommended because many times the data you get is out of range of C++ data types(even long long). JAVA has Big Integers that can handle that data. Also many a times PYTHON helps to solve the problem in minimal lines of code. For ex,


This question asks for IRR . PYTHON already has a predefined function for IRR in the module NUMPY. Thus we are left with just 10 lines of code.

PYTHON also can deal with the large Integers but both JAVA and PYTHON have a disadvantage of being slow.

Its not that the large integers questions cannot be solved by C/C++. We need to design some algorithm to handle the same. For ex,


This can be handled by redefining the multiplication algorithm.

~~ Cheers!

Please answer the poll on the right side!!






No comments:

Post a Comment