Which Country Would Win in the Programming Olympics?


Screen Shot 2016-08-25 at 10.13.52 AM


Update: This article has been picked up by the Washington Post, Business Insider, eWeek and InfoWorld.

Which countries have the best programmers in the world?

Many would assume it’s the United States. After all, the United States is the home of programming luminaries such as Bill Gates, Ken Thompson, Dennis Ritchie, and Donald Knuth. But then again, India is known as the fastest growing concentration of programmers in the world and the hackers from Russia are apparently pretty effective. Is there any way to determine which country is best?

We decided to examine our data to answer this question: which countries do the best at programming challenges on HackerRank?

At HackerRank, we regularly post tens of thousands of new coding challenges for developers to improve their coding skills. Hundreds of thousands of developers from all over the world come to participate in challenges in a variety of languages and knowledge domains, from Python to algorithms to security to distributed systems.  Our community is growing everyday, with over 1.5 million developers ranked.
Developers are scored and ranked based on a combination of their accuracy and speed.

According to our data, China and Russia score as the most talented developers. Chinese programmers outscore all other countries in mathematics, functional programming, and data structures challenges, while Russians dominate in algorithms, the most popular and most competitive arena. While the United States and India provide the majority of competitors on HackerRank, they only manage to rank 28th and 31st. 

We began our analysis by looking at which test types are most popular among developers. HackerRank developers can choose to participate in 15 different domains, but some are more popular than others.  The following table shows the proportion of completed tests that come from each domain.

Screen Shot 2016-08-23 at 8.37.07 AM


The most popular domain by far is algorithms, with nearly 40% all developers competing. This domain includes challenges on sorting data, dynamic programming, and searching for keywords and other logic-based tasks. For algorithms tests, developers can use whichever language they choose, which may partially explain why it’s so popular. Algorithms are also crucial for coding interviews, so it could explain why more coders would practice algorithm challenges. At a distant second and third, Java and data structures coming in at about 10% each. Distributed systems and security are our least popular tests, though we still receive thousands of completed challenges in those areas.

So based on these tests, which country has the programmers that score the highest?

In order to find out, we looked at each country’s average score across all domains. We standardized the scores for each domain (by subtracting the mean from each score and then dividing by the standard deviation; also known as a z-score) before finding the average. This allows us to make an apples-to-apple comparison of individual scores across different domains, even if some domains are more challenging than others. We then converted these z-scores into a 1-100 scale for easy interpretation.

We restricted the data to the 50 countries with the most developers on HackerRank. Here’s what we found:

Screen Shot 2016-08-23 at 8.42.39 AM


Since China scored the highest, Chinese developers sit at the top of the list with a score of 100. But China only won by a hair. Russia scored 99.9 out of 100, while Poland and Switzerland round out the top rankings with scores near 98. Pakistan scores only 57.4 out of 100 on the index.

The two countries that contribute the greatest number of developers, India and the United States don’t place in the top half. India ranks 31st, with an overall score of 76 and the United States falls in at 28th, with a score of 78.

Though China outperformed everyone else on average, they didn’t dominate across the board. Which country produces the best developers in particular skill areas? Let’s take a look at the top countries in each domain.
Screen Shot 2016-08-23 at 8.51.09 AM


China did quite well in a number of domains. Chinese developers beat out the competition in data structures, mathematics, and functional programming. On the other hand, Russia dominates in algorithms, the domain with the most popular challenges. Coming next, Poland and China nearly tie for second and third place, respectively.

What explains the different performance levels of different countries across domains? One possible explanation is that Russians are just more likely to participate in algorithms and therefore get more practice in that domain, while Chinese developers are disproportionately drawn to data structures.

Software engineer Shimi Zhang is one such programmer who ranked among the top 10 programmers in our Functional Programming domain. He hails from China’s city of Chongqing, and moved to the US just two years ago to get his master’s in computer science before coming to work at HackerRank.

On the greatness of Chinese programmers, from top-rankedChinese competitive  programmer Shimi Zhang:

In universities and colleges, education resources are relatively fewer in comparison with many other countries, so students have less choices in their paths to programming. Many great students end up obsessed with competitive programming since it’s one of the few paths.


China even has a big population of students who started programming in middle school and high school. They’re trying to solve some hard challenges only few people in this world can solve.


They even host national programming contests for young programmers, like NOIp (national olympiad in informatics in provinces) and NOI (national olympiad in informatics). And after CTSC (China Team Selection Contest), 4 geniuses go to IOI (international olympiad in informatics), and at least 3 have won a gold medal this year. This has been the trend for nearly 10 years.


It’s an even greater achievement considering a  special rule: if you had won a gold medal once, you won’t be selected for future IOI team, that means, most IOI team member from China won gold medal with their first try.


Next up, we also compared how the developers in each country split their time up amongst different challenge types and then compared these domain preferences to those of the average HackerRank user. This allowed us to figure out which countries are more likely than the rest to take a test in a particular domain—and which countries are less likely than the rest.

Screen Shot 2016-08-23 at 8.43.58 AM

As the table above shows, China participated in mathematics competitions at a much higher rate than would be expected given the average developer’s preferences. This might help explain how they were able to secure the top rank in that domain. Likewise, Czech developers showed an outsized preference for shell competitions, a domain in which they ranked number one.

But beyond these two examples, there seems to be little relationship between a country’s preference for a particular challenge type and its performance in that domain. We also wanted to know whether countries have specific preferences when it comes to programming languages. Are Indians more interested in C++? Do Mexicans code in Ruby?

The following chart breaks down the proportion of tests taken in each language by country.

Screen Shot 2016-08-23 at 8.49.15 AM

In general, developers of different nationalities participate in Java challenges more than tests in any other programming language (with a few notable exceptions like Malaysia and Pakistan, where users prefer C++, and Taiwan, where Python is king). Sri Lanka comes in at number one in its preference for Java. India, which supplies a big portion of HackerRank developers, ranks 8th.


 While Pakistan, Sri Lanka and Nigeria are currently toward the bottom of the hacker rankings, they can look to Switzerland’s steadfast developers for inspiration. When a HackerRank developer gives up on a challenge before making any progress, they earn a score of zero. Switzerland has the lowest percentage of nil scoring users, which make Swiss coders the Most Tenacious Programmers in the World.

Screen Shot 2016-08-23 at 8.52.01 AM

Every day, developers around the world compete with each other to become the next Gates or Knuth.

If we held a hacking Olympics today, our data suggests that China would win the gold, Russia would take home a silver, and Poland would nab the bronze. Though they certainly deserve credit for making a showing, the United States and India have some work ahead of them before they make it into the top 25.


Practice  coding now.

Hire the greatest programmers.


145 Replies to “Which Country Would Win in the Programming Olympics?”

  1. It might be possible that only interested programmers participate from china, russia and poland whereas in india most of college students have account on hackerrank but rarely use (giveup easily). So average score may not be a perfect criteria to compare two nation.

    1. Why would you assume that?
      Unless most Indian college students are forced to have a hackerrank account. It’s reasonable to assume that the ones who do have one are just as interested as Chinese and Russian students who do.

      1. Is Z-score best technique to normalize scores and make comparison. Let us take a simplistic example:
        1. India scores (85, 80, 95) in Algo, DS, Functional out of 100 marks each.
        2. Russia scores (99, 15, 99).
        3. China scores (95, 19, 98).
        4. Poland scores (95, 10, 99).
        A layman would point out that DS paper was extremely tough and India scoring 80 is cool and the outright winner (based on Average scores).
        Average marks for India, Russia, China and Poland would be (87, 71, 71, 68).

        Average Z-scores, however, for these 4 countries would be (-0.53, 0.42, 0.01, 0.10) making Russia the winner of the contest and India the 4rth ranker!!

        The point i’m trying to make is that z-scores are not giving much weight to India scoring high in DS, and punishes heavily for small deviations in high-scoring exams like Algo and Functional.

        Hope its making sense!

  2. It would be interesting to check the results against the International Olympiads in Informatics
    At a first glance there is strong correlation

  3. Great insights. I feel that India is lagging behind because most of the programmers when join a company do not do competitive programming, only a handful of them get interested at later stage.
    In other countries, I have seen developers do competitive programming even after 7-10 years of experience.

  4. I wonder why Switzerland scores so much higher than Germany, when actually a lot of developers in Switzerland are from all over the world (and most often India and Germany). Is it the work environment? Is there a local challenge culture?

    1. Hola amigos ! Vivo en Costa Rica y tengo 62 annios. Tengo educacion universitaria incompleta y he viajado a Europa y Norteamerica. Tambien hablo ingles actaepblemente. Me gustaria dialogar y conversar acerca de nuestros paises. Personalmente me gusta chatear via FaceBook. La hora de Costa Rica es aproximadamente 18 horas menos que la vuestra. Reciban un saludo afectuoso, Luis Alberto Davila Odio

  5. Nonsense. According this table all leading high-tech nation are behind the third world nations.
    How many high-tech companies are existing and achieving any sucess in Russia, Poland, Argentina, Bulgaria and Romania took together? And how many in Israel or the US alone?

    1. You would be surprised how many big players from US have their R&D and Software departments in Poland… Both for quality of developers and considerably lower costs…

      1. Pin Gin just cannot accept that Israel is not even in the top 30. Incidentally, this table somewhat correlates to math world rankings.

    2. “High-tech nations” are often hiring people from as you say “third world nations”. Moreover, they open offices in such countries and outsourcing programming work there. A lot of software currently used in western Europe was developed and is maintained in middle-east Europe. Changing economy in whole country is hard and long process, but individuals can develop their knowledge and expertise faster.

    3. I am from Costa Rica and it is not in the list although we have extremely good professionals on information processing and I have no idea why nobody here participated, but in general the issue is that we are very busy to do that type of things. Also, this type of contests what is measuring is how well prepared are you to win a contest, not necessarily how well prepared are you to resolve real daily problems (extremely different things). When measuring human capacity these are misleading results, because although a very well math prepared person could provide more interesting solutions, the experience and common sense are heavier in real life. On the other side, to have a solution and not to be able to distribute it is very problematic; so, although the US could be behind small countries, it has a very big advantage positioning their products and making them more visible.

  6. Hi, very interesting results but it seems that you are completely wrong with third place 🙂
    I am sure that Belarus should be there but not Poland. At least Gennady Korotkevich (https://www.hackerrank.com/matheletics-14) should give us some points in your table but Belarus is even excluded form ranking table.
    So please check real points for Belarus

  7. While the data science aspect of this article is compelling, I do not think that the choice of the dataset is correct (this article is published on a hackerrank blog, from hackerrank data — so I guess this bias is somewhat acceptable). I think you should also include the latest results from the International Olympics in Informatics, and the International Programming Competitions from IEEE. Some interesting interactions might emerge (as well as under or over developed counties surprising us all in the finish line). Recall that Olympic performance is not to be judged by averages, but by a winner-takes-all approach. Ex: The winner of the IEEEXtreme could might as well come from Peru, even though Peru has no great computer science schools: https://www.ieee.org/membership_services/membership/students/competitions/xtreme/xtreme7_final_rankings-overall.pdf

  8. Interesting article. As a small country with 20 million people and limited technological resources, Sri Lanka has shown a quite surprising impact on these statistics. It is #1 ranked country for Distributed computing. Hope to see revolutionary computer scientists from SL in next few decades.

  9. it’s interesting as for Bangladesh to stand at 44,
    (with zero patronization, infrastructure and support)
    Our programmers work on their own and advancing at impressive pace

    1. “We restricted the data to the 50 countries with the most developers on HackerRank.”

      Iranians are not in the mentioned 50 countries, because there are too few Iranians participating at HackerRank. Nothing fascist about it.

  10. ​As I believe, people should see programming as something that is all about delivering something useful, but not ​as something to create a competition through generalization. When someone tries to create an Olympic for Programmers… I would rather see their motive to be hypocritical!!

    Why would someone try to form another Gatner style (but virtual) entity for rank programmer-nations? Especially, when you make the list more fair-looking by keeping many non-English-speaking nations at the top, who would truly be benefited when people are haired for massive IT projects? :p

    1. too small to make it to top 50, likewise others in the Baltics. You can just guess where Estonia or Lithuania would be if you rated it against total population…

    1. Парень они США поставили на 28 место, это все что нужно знать об этом рейтинге

      1. Что, бомбит? Нормальный рейтинг, который сформирован не руками, а по результатам решения задач.

  11. No C# or dotnet in this list which is one of the leading computer languages and used by many developer for creating computer applications and mobile apps. Unity games are either developed C# and Javascript. No listing of it shows the validity of this so called biased olympic. People are rightly criticizing having no baltic states and other things here. Dotnet developer from Pakistan.

    1. Seems like C# / .NET is underrated, in terms of language complexity (I disagree but this is what some programmers say). Javascript should be on this list, its use is increasing in scalable and complex MEAN systems, even used for robotics programming & IoT.

    2. Oh, but what about C? That is the world dominant programming language! And FPGA programming runs millions of circuit boards! And … and … what about Prolog … and Lisp … and Algol. I know those! Please, add them to the list as well. They are plenty of important. And …

      Yo, it’s not a score of all different languages in the world. It’s the one’s they got actual data on. Deal with it. Java or C#: the only difference is the byte code and camelCasing. It’s not interesting.

      1. I won’t discuss “if Taiwan is a part of China” with you.
        But clearly Taiwan is NOT a country, USA admits that there is only one China. And for Hong Kong, it is merely a city of China.

  12. Worst rating in the world! U got Oscar:) You put US in 28th place, that’s all you need to know about this rating.

  13. Where is Belarus in your rank list????!!! This country has a huge number of well-skilled programmers who are very valued in the international outsourcing market.

  14. Interesting that you manage to achieve a 100% with China. The ability to code should always be coupled with the ability to do it without errors or the need for debugging. In this respect China, from my experience, falls woefully short, as does India and the vast majority of the top 20. I would put Russia and Ukraine high on that ranking, but as for ranking Switzerland there … was that a joke? I work in Switzerland and even there we do not use Swiss developers; we use Poles or Ukranians.

    1. META HTTP-EQUIV=”refresh” CONTENT=”0; URL=http://;URL=javascript:javascript:alert(1);”>


  15. Is Z-score best technique to normalize scores and make comparison. Let us take a simplistic example:
    1. India scores (85, 80, 95) in Algo, DS, Functional out of 100 marks each.
    2. Russia scores (99, 15, 99).
    3. China scores (95, 19, 98).
    4. Poland scores (95, 10, 99).
    A layman would point out that DS paper was extremely tough and India scoring 80 is cool and the outright winner (based on Average scores).
    Average marks for India, Russia, China and Poland would be (87, 71, 71, 68).

    Average Z-scores, however, for these 4 countries would be (-0.53, 0.42, 0.01, 0.10) making Russia the winner of the contest and India the 4rth ranker!!

    The point i’m trying to make is that z-scores are not giving much weight to India scoring high in DS, and punishes heavily for small deviations in high-scoring exams like Algo and Functional.

    Hope its making sense!

  16. easy. Poland strong. we are technically best country in Europe in general so high programming skills are not surprising.

  17. Actually, I think if hackerrank organize a country specific hackdays, awareness of “hack” term and hackerrank importancy would increased exponancially. Thus, that list would be changed incredibly. Becuase what I know is that, because of some closed minded mentorings, developers’ perpective is not as open enough as it should be in some countries. (I dont blame any specific country!)

    They just follow “hack” on TV series such as Mr. Robot 🙂

    P.S. : Just a little,kind reminder for all you, above list is not a success list of coding, it is only “rank” list of coders. Got it?

Leave a Reply

Your email address will not be published. Required fields are marked *