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!!






Saturday 19 November 2016

What all should I know to be a good Competitive Programmer?

Competitive Programming(CP) mainly deals with algorithms. One has to be strong in developing algorithms and should have an excitement to solve a problem.
The most important thing here is the "Patience". You cannot learn Competitive Programming in one day. It has taken years for masters to become masters. But one thing that should keep you motivated is that masters were someday beginners. If they can be why not you?

To develop algorithms, one has to be strong in Mathematics and logical ability to solve a problem. 
The best way to learn in Competitive Programming is to "Practice". And the best way to advance is to fail to solve a problem. You will think of the solution to the problem till the time you are exhausted and that is what is needed. Even you fail many times, don't give up.

A bit of knowledge on Complexity Analysis and Discrete Mathematics is required for a good solver.

There are different types of problems that one can encounter or they could be called a strategy to solve a problem . Those Include-

  1. Dynamic Programming(Knapsack, 8-queens, Traveling Salesman)
  2. Backtracking(8-queens,Sudoku)
  3. Greedy Algorithms (Matching Pursuit, Egyptian Fractions)
  4. Sorting (Quick Sort, Merge-sort)
  5. Search(Linear Search,Binary Search)
  6. Path Finding(BFS,DFS)
  7. Network Flow Problems (Minimum Cut, Max Flow)
  8. Combinatorial  (Permutations, Calendrical Calculations)
  9. Geometrical (Convex Hull, Minkwoski Sum)
Having knowledge about these algorithms is surely a plus as it will help you to think about a problem's solution and once you are through with these, you can easily optimise your solution according to the requirement of the problem.


~~Cheers!

What is Competitive Programming?



Competitive Programming is the sport of programming where in you can learn while competing with programmers round the globe. Many students consider this as a source to get a job, but it is more of a learning journey .
In India, Competitive Programming wasn't in a trend and students don't really know about it. This blog will help you  to get introduced with it and how you can improve your journey to become a good Programmer.

There are various online  judges that can help you get started. Some of the best ones to get started are-

  1. Codechef
  2. Hackerrank
  3. Codeforces
  4. TopCoder
  5. HackerEarth
Among the judges listed above the best tutorials can be found on Hackerearth(CodeMonks) and Topcoder.

To get started with Hackerrank , I personally made a video for the Beginners to get started.


This blog will cover all the topics required to get into Competitive Programming.

~~Cheers!