• Solving Complex Problems At-Scale: How Topcoder Community Members Can Help You Dominate Your Next Project

July 17, 2019 Solving Complex Problems At-Scale: How Topcoder Community Members Can Help You Dominate Your Next Project

The National Institute of Standards and Technology Public Safety Communications Research Division recently joined forces with Topcoder and HeroX to develop new methods and improve existing methods of data de-identification for the security, safety, and improved analysis of datasets. During this competition, Topcoder was able to leverage an incredible pool of talent to deliver profound results to NIST. In particular, A Topcoder Copilot, birdofpreyru (aka Sergey) defined new techniques that furthered research and development into sophisticated data de-identification methods. And, it helped NIST measure the value of their Topcoder solution. Today, we’re going to talk about how Topcoder was able to connect NIST with critical talent like birdofpreyru — who helped innovate for both for the customer and Topcoder. This incredible community dynamic helps us provide continued success for clients spanning across industry verticals and research groups. Crowdsourcing is more than just an anonymous pool of talent. There are intelligent, driven, inspired individuals that make these projects work. And Topcoder brings them at-scale (+1 million members and counting!). This is a story of how a member of Topcoder helped redefine differential data privacy for both NIST and the entire differential privacy community.

Understanding Differential Privacy

The world runs on data. Data fuels critical business decisions, drives marketing campaigns, and is utilized in the development of protocols and products. And, data helps us declutter the world and create meaning out of the chaos. But, data is only useful when you can analyze it. Here’s the problem — large data lakes filled with datasets from various sources can create security risks. Linkage attacks (or attacks that combine these anonymous data sets with existing records to identify individuals) are a growing problem in the security space. For example, Netflix published data pertaining to the ranking of movies from 500,000 customers in 2007. Researchers found that they could easily identify the individuals by leveraging existing data from IMDB. This problem magnifies when we talk about public safety. In 1990, Stanford researchers de-anonymized the data of the U.S. census and accurately identified 87% of the U.S. population. This creates barriers for researchers trying to identify critical trends in public safety. If data can be de-anonymized, threat vectors are opened — which puts all individuals with data in the pool at risk. Want to learn more about differential privacy? Check out this Wired story .

The NIST Differential Privacy Synthetic Data Challenge

For NIST, differential privacy is a big deal. The ability to work with large public safety datasets to garner actionable insights that guide policy and protection is a core function of NIST. Unfortunately, those capabilities are blockaded by this de-identification conundrum. To help solve this issue, Topcoder, NIST, and the Laboratory for Innovation Science at Harvard joined forces to create algorithms that will help solve differential privacy issues. These synthetic data generation algorithms produce synthetic data that can replace the original data for the purposes of data analysis — thereby circumventing the differential privacy barrier. To do this, Topcoder members were given a data set of emergency response events that occurred in San Francisco, as well as a sub-sample of past U.S. census data. The goal: develop an algorithm that could replace data within these sets with synthetic data that would still provide value for analysis without subjecting the datasets to possible linkage attacks.

How Topcoder Helped NIST Find the Talent They Needed

When governments or private/public entities need a set of advanced algorithms that can help solve a real-world problem at-scale, finding the appropriate talent to create, test, and produce these algorithms can be difficult. These are cutting-edge security algorithms that are attempting to deconstruct a complex privacy and security problem using large sets of data, so finding global support is a critical component of creating a compelling and functional algorithm. To connect NIST to a global set of intelligent coders, Topcoder leveraged a crowdsourcing challenge — which provides financial rewards for achievements gained towards the ultimate goal of creating a functional synthetic data generation algorithm.

The Topcoder Copilots

At Topcoder, we leverage crowdsourcing dynamically. One way that we provide ongoing value is through our Copilots. These are the people that assist in setting up and running challenges, which often involves creating complex measurements, assisting in research and development, and defining the scope and problem definitions. In our Data Science practice, before complex problems are solved by the rest of our community, these Copilots get busy developing unique solutions that ensure that each client that comes to Topcoder can accurately measure the value of the solution being delivered. One of the Topcoder Copilots, birdofpreyru (or Sergey,) helped solve a fundamental problem in the construction of synthetic data generation algorithms — ensuring that the synthetic data generated conserved its clustering characteristics and that the challenge was able to be accurately and successfully measured to the parameters necessary to provide NIST with the value they needed.

Copilot: birdofpreyru

topcoder problem solving

  • Emerging research has suggested that 3 columns are sufficient for ensuring the clustering characteristics of synthetic data, but case studies are virtually non-existent. This means that birdofpreyru not only delved into research that’s recently emerging in a niche field, but he was able to prove that 3 columns was sufficient for this purpose and apply that to real-world algorithm and scenario.
  • He increased the speed at which all data set characteristics were verified by checking the minimum number of columns possible to ensure the quality of data. This helped Topcoder provide faster resolutions for NIST, and it provided NIST (and the entire community of differential privacy) with a credible and valuable case study for synthetic data clustering conservation.

Birdofpreyru highlights the value in crowdsourcing. He’s talented, smart, and willing to go the extra mile for each client. Crowdsourcing may not include on-site teams, but that doesn’t mean the crowdsourcing community isn’t delving into cutting-edge techniques and problem-solving methods to ensure that clients receive incredible value at-scale. Each Topcoder experience provides layers of value. Whether you need to define the scope, create solutions, R&D assistance, or problem definition, Topcoder provides remarkably deep crowdsourcing to meet each and every client’s needs.

Final Thoughts

The value in crowdsourcing goes beyond the global reach and scale. There’s virtually no other method of development, testing, QA, etc. that gives you access to the breadth of talent that crowdsourcing does. Finding and hiring a person who understands emerging research in differential privacy like birdofpreyru is nearly impossible for the majority of businesses or research centers. When you need a complex problem solved fast, Topcoder’s pool of talent will be here waiting. And, each of them has a particular set of talents that makes them invaluable. With +1.5 million members and counting, Topcoder can help your business find incredibly talented coders, testers, and data scientists. And, we combine them with hyper-intelligent, dedicated top-level support that can help, so that you can take your project to the next level. Talent, scale, speed, and value — those are the core tenants of Topcoder. Is your business ready to scale its next project? Contact us ! We can help. Don’t believe us? Check out The Forrester Total Economic Impact™ of Topcoder — which shows how Topcoder can boost your ROI by 113% on large enterprise crowdsourcing programs.

Challenge Architect

categories & Tags

TOPCODER NEWSLETTER KEY STORIES, DELIVERED MONTHLY

Related posts.

topcoder problem solving

June 3, 2024

Navigating the Paper Trail: How Topcoder is Revolutionizing Form-Filling

topcoder problem solving

March 27, 2024

QA Trends to Watch and the Latest Trends in AI and Automation Related to QA

topcoder problem solving

February 29, 2024

ALL ABOUT INNOVATION CHALLENGES AT TOPCODER

Sign up for the topcoder monthly customer newsletter.

Your information has been successfully received

You will be redirected in 10 seconds

December 30, 2019

Solving problems using constraint logic programming.

Upskill with

Topcoder SKILL BUILDER COMPETITIONS

Competitive programming problems are designed to be solved by making some observations about the problem and coming up with a clever algorithm based on them. This is further facilitated by limiting the number of programming languages and libraries supported by Topcoder platform: if the problem is a perfect fit for some tool or library that is not supported by the platform, the participant has no choice but to roll up their sleeves and figure out that algorithm. However, I don’t think I need to persuade anybody that various programming languages and specialized libraries are still very useful - both for the competitions that allow the participants to use arbitrary programming tools and for those (undoubtedly rare) cases when one encounters an algorithmic problem outside of programming contests. In this post I’ll introduce you to one such language - Picat[1], a logic-based multi-paradigm programming language that makes solving certain kinds of algorithmic problems incredibly easy, - and show you how it works on an example problem from a past SRM.

ThreeColorabilityEasy[2]

In this problem you were given a planar graph of a specific structure - the vertices were the lattice points of a rectangular grid, and the edges were horizontal and vertical edges between adjacent vertices, as well as one of the two diagonals in each square cell. Here is an example of such a graph:

image

The problem asked you to figure out whether the vertices of this graph could be painted using three colors so that no pair of vertices connected by an edge would be painted the same color. The expected solutions described in the editorial[3] required you to analyze the problem and either try and color the graph (which yielded a lengthy and error-prone code) or figure out the necessary and sufficient condition of the graph being colorable - each row of the diagonals must either equal the previous row or be its opposite. Neither of these approaches is trivial (you can read more about them in the editorial), as is befitting a problem offered as Division 2 Hard.

Picat Solution

Fortunately for us, this problem is an excellent example of a constraint logic programming task, and is perfectly suited to solving using Picat - with barely any thinking required! A Picat solution literally takes the problem statement and translates it into a set of variables and constraints that describe a valid graph coloring:

Colors is a rectangular array of vertex colors; Colors :: 1…3 tells us that each color can take values 1, 2 or 3.

The three foreach loops set the constraints on colors of vertically, horizontally and diagonally adjacent vertices, respectively.

Once the constraints are established, solve(Colors) looks for the solution that would satisfy them. Under the hood it alternates between constraint propagation (figuring out the domains for the unknown variables based on the constraints and known variables) and search (picking one of the unknown variables and assigning it a value from its domain) until a solution is found or all search space is exhausted. Below is the full solution code. It assumes that the test case is fed to the program via standard input stream as a sequence of lines describing the direction of the diagonals in the graph. The image above would be described by the following input:

The beauty of this solution is that one doesn’t need to think about the intricacies of implementing the search, the pruning of the search space and backtracking from branches that don’t yield a solution - Picat does all the heavy lifting for you! You can also switch the solving mechanism from constraint programming to a different tool, such as SAT solver, by changing the import in the first line while keeping the rest of the code intact. Finally, each solver offers you a variety of options and heuristics to choose from to fine-tune the search process. For this problem constraint programming with default options turned out to work just fine - all test cases, including the largest ones, were solved in under two seconds. Picat can also answer other related questions with very minor code modifications - for this example, it might not just figure out whether the coloring exists but also return any valid coloring or the valid coloring that satisfies some extra requirements (such as being lexicographically first or coloring the fewest vertices red).

I hope you found this post interesting and educational! If you’re curious to learn more about solving other types of competitive programming problems using Picat, check out the paper[5].

Acknowledgements

I’m grateful to Sergii Dymchenko/kit1980 for his help!

References:

Picat programming language

ThreeColorabilityEasy problem statement

Declaratively solving Google Code Jam problems with Picat

Codeforces

Rating
# User
1 ourist 3843
2 iangly 3705
3 enq 3628
4 rzdevinwang 3571
5 eothermal 3569
5 nnfls_csy 3569
7 qdai0815 3530
8 cnerwala 3499
9 yh20 3447
10 ebelz 3409
| |
Contrib.
# User
1 171
2 164
3 163
4 159
5 aroonrk 154
5 154
7 152
8 etr 147
9 145
10 144

New comment(s)

  • Submissions

E869120's blog

[Tutorial] A Way to Practice Competitive Programming : From rating 1000 to 2000

Dear Codeforces Community. Today I want to share some ways to practice competitive programming and getting rating. I think this is helpful for those who is practicing competitive programming hardly but rating is sluggish. (By the way, on July 17th, I have a project of competitive programming said CombNaf in Japan. I did a lecture about this. Great thanks to the CombNaf's organizer is nafmo2 .) I will write this by 4 steps : rating 1000 --> 1250 , 1250 --> 1500 , 1500 --> 1750 , 1750 --> 2000 , in Codeforces Rating System. Before writing about each step, I wrote it as premise: You don't have to do this way. This is just a way to practice. Ways to practice is different among people, so I think this may not the best, but I hope this is useful.

Step 0: Some types of contest (A knowledge)

In order to explain step 1-5, I wrote about the types of programming contest. Codeforces

  • This judge. There are Div.1 problems and Div.2 problems. The number of contest is mainly 5-6.
  • The problems of Div.2 said Div2 A, Div2 B, Div2 C, Div2 D, Div2 E,... in order.
  • The problems of Div.1 said Div1 A, Div1 B, Div1 C, Div1 D, Div1 E,... in order.
  • Problems are sorted by difficulty in each contest.
  • There are ABC (AtCoder Beginner Contest) / ARC (AtCoder Regular Contest) / AGC (AtCoder Grand Contest) in AtCoder, but in this blog I will explain about ABC / ARC.
  • There are 4 problems in ABC and ARC.
  • Each problem in ABC is said ABC-A, ABC-B, ABC-C, ABC-D, and each problem in ARC said ARC-C, ARC-D, ARC-E, ARC-F.
  • Problems are sorted by difficulty.
  • In each contest, ABC-C and ARC-C is the same problem, and ABC-D and ARC-D is the same problem.
  • There are Div.1 and Div.2, and there are contest for each division.
  • In Division 2, there are three problems, which is said that Div2 Easy, Div2 Medium, Div2 Hard.
  • In Division 1, there are three problems too, which is said that Div1 Easy, Div1 Medium, Div1 Hard.
  • Easy is the easiest question of three, and hard is the hardest question in these three as naming.

Step 1: Rating 1000 --> 1250

In order to gain rating from 1000 to 1250, you should solve at least one problem in Div.2 contest in Codeforces. In AtCoder, 300 points problem is the level of rating 1100-1250. So I suggest these two ways:

  • Solve Div2 A 50 problems. When you solved 50 problems, you might be able to solve >80% of Div2 A.
  • Solve ABC-C in AtCoder. There are many educational problems in AtCoder Beginner Contest.

Step 2: Rating 1250 --> 1500

In order to gain rating from 1250 to 1500, you have to solve at least 2 problems faster in Div.2 contest. In addition, the level is as same as TopCoder Div2 Med and AtCoder ABC-D . (ABC-D is little high level for 1250) In addition, there is many educational problems in AtCoder, there is some point to do fast-solving practice in TopCoder, and Codeforces is the target judge. So I suggest these three ways:

  • Solve Div2 B 50 Problems. (Most of problems are good quality)
  • Solve Div2 Med 50 Problems. (The quality of problem is good, but Java Applet is inconvenience...)
  • Solve ABC-D / ARC-D in AtCoder. (A little high level for 1250)

Step 3: Rating 1500 --> 1750

Judge Concept Imprementation Fast solving Level
Codeforces Div2 C 50% o 50% 1500-1800
TopCoder Div1 Easy o x o 1500-2000
AtCoder ABC/ARC-D 50% o 50% 1400-1600
  • Solve Div1 Easy and Codeforces Div2C as the same period. I think if you solve <50 problems for each type, your rating will increase strongly, but I suggest you should solve until satisfied yourself.
  • First solve ABC/ARC-D in AtCoder until solve 80% of ARC-D. Second solve Div1 Easy in TopCoder for concept-practice or fast-solving practice.

Step 4: Rating 1750 --> 2000

This is the last step that I can write. In order to gain rating 1750 to 2000, first you must go up to Div1, and you have to compete a little better in Div1. You have two steps, so I divided into two range. 1. Rating 1750 --> 1900 You should solve Div2C faster and stably. So I suggest that practice these two:

  • Overcome your weakness (For example, DP problems, Graph Theory, Imprementation, etc.)
  • Make your library (For example, RMQ, BIT, Segment-Tree, etc.)

  • Codeforces Div1 B. In the story, the goal is becoming 2000+ in Codeforces. So practicing in Codeforces is the best too to get rating in CF.
  • AtCoder ARC-E. ARC-E is 600-900pts in AtCoder, and this is level of rating 1900-2200. In addition, these problem is very like to Codeforces.

Step 5: Extra corner

In extra corner, I suggest two ways to compete well in Codeforces. This is also out of the problem-practice, but I think this is effective. (I did this and I feel this is effective.)

  • Do Virtual Contest / Virtual Participation in Codeforces. This is a way of get use to contests.
  • Take a rest for 10 minutes before real contests. This is a way to not get panic in the contest. It is also important in the contest on the mental side.

I suggest that five steps to practicing competitive programming. Ways to practice is different from a person to a person, so I don't think you must do this way. But this is one of the effective way I guess. (I think this is not the best because the way to fit is different among people.) I hope it will be useful even a little. (Also, sorry for my poor English.) Please comment if you have suggestions and questions of this entry, and my way to practice.

Thank you for reading!

Tags

, | +22
, | +6
, | +88
, | -10
, | Rev. 7   +10

Edit.

And the problem there is the fact, that the point differences do not reflect the difficulty increase. Quite often solving C and D is worth more or the same as E and sometimes even more than F. So if I managed to solve F or E I do not have time to solve both C and D.

In CF a point value decreases with time. So if you are not quite fast, you can get lower score than solving A+B fast.

Edit2.

As regards AtCoder. The idea of a point value is: AtCoderPointValue/2 = TCPointValue. And even though solving 2 x 250 pts in TC is nowhere near solving 500, that problem does not exist, as there are 3 problems only and each problem is worth more than the sum of all easier problems. In AtCoder there are more problems, so you could get a higher score by solving more simpler problems.

, | +113

Write 'bout bullshit.

, | +45
, | -18 because my rating is AtCoder was middle of orange then. ( )

But this is Japanese version, so I have to translate from Japanese to English. In this process, I decided to change the target from AtCoder to Codeforces. But my rating is 2051, middle of purple.

So I thought that I cannot write how to practice for red then in CF Version.

But these days I'm praciting TopCoder Div1 Med for becoming red. There are a lot of concept-main problems in TopCoder Div1Med.

, | +6

I just had some questons:

1) I was not aware of AtCoder but it seems AtCoder's contests have tasks A,B,C,D ..., so what do you mean when you say "ABC-C in AtCoder."? Do you mean to solve tasks A, B, and C? Then what does the "-C" refer to? Also in step 2 you say "ARC-D in AtCoder", what is "R" for?

2) How exactly can the bingo approach help us in step 1? Is it to solve at least 5 problems horizontally, diagonally or vertically? What's the point of your middle box with the "Is it rated?" question?

3) What do you mean exactly with the "o" and "x" in the table of step 3?

Thanks :)

, | +7


And "ABC/ARC-C" means that you should solve the first problem of ARC (ARC-C) / the third problem of ABC (ABC-C). ABC-C problem and ARC-C problem is the same in each ABC/ARC contests.



. Horizontally, diagonally and vertically are all OK


means that the effectivity is high for concept-practice etc. means that the effectivity is low for concept-practice etc. means that the effectivity is medium for concept-practice etc.

Sorry for my poor English.
Thank you for reading my post.
, | Rev. 2   +152 . After that, the strategy wouldn't work well.

What I imagine about rating ( in Topcoder, in AtCoder):

After , you have to solve once in the problem set in several rounds, and many problems are not solved by knowledge, reflection or one-step consideration. Those are all creative, ad-hoc problems.

I once heard that in order to tackle with ad-hoc problems effectively, you have to throw yourself into a problem for hours, and try everything you can try, and train your instinct — which kind of algorithm works to certain problems. This is the skill which fast-solving or virtual contests doesn't help you improve.

On the other hand, although I don't like to say this aloud, from this rating zone I feel your latent ad-hoc (or mathematical) power makes a lot of difference. It is often said that IMO gold medalists can be very strong in programming contests once they know typical algorithms and get used to implementation. (Even if the difference derives from how they trained their mathematical skills when they were young,) you can't change what you are. I realized that I wasn't a genius, when I lost to a lot of OI friends in national math olympiad after studying hundreds of hours for that.

But that doesn't mean you can't become a skilled competitive programmer. The practice I said surely change your ad-hoc skills in a long view. Sharpen your intuition, tackle novel problems with it. Neither your friends' solution, official summary, nor textbooks help you training your intuition. Find your way of treating with the problems. I've advanced to DCJ2017 Finals with my intuitive answer of E-large.

That's why I keep saying becoming a red coder is the start of competitive programming.

(P.S. it's often said that a lot of CF hard problems are typical with demanding implementation. If it's truly so, assume the goal as "becoming in AtCoder" or "advancing GCJ finals" instead. If you're Cuban or Quebecois etc, then I'm sorry for not giving good alternatives to you.)

Sorry for my poor humanity.

, | Rev. 2   +33

No, seriously, I liked what you said :) It's a little bit extremist I would say but I like it haha, even though I'm not red -yet-.

I would like to know if some top coders feel the same way as you. I feel that something that can help you develop intuition is to explain things to others. (but again, I'm not red xD)

, | +10
, | +2
, | +61
, | -35
, | +3
, | +16 's blog, 8 hours ago, 's blog, 3 weeks ago, 's blog, 8 months ago, 's blog, 14 months ago,
Needless to say, this is only my opinion, but I found there are many people who want to gain to 2000+ rating, including , so I recommend to read this blog article carefully. (I did not say that you should do for this way)
, | +5
, | Rev. 2   +5
I think they will practice hard — but He would like to say for Codeforces user (I don't know other judge but combination of these three is very good). I am risking that the Topcoder competitive programmer is decreasing and people might forget Topcoder, but it is still the best way of growing "thinking solution" skills, as he mentioned.
Also, he's saying that gray and green is very different, green and blue is very different, and also blue and yellow is very different.
I think the main point is these two (but also other things or extra corner are written so you can read from it). Did you get it?

, | Rev. 3   +3
, | +3
, | +16
, | +8
, | +3
, | Rev. 4   0 )

Based on his research the author concluded that to improve we need the right level of challenge. If its too easy you don't improve, if its too hard you give up. I think this current article is just about that principle put to use.

The wiki page talks more about his 10,000 hour rule for being the very best.

, | 0
, | +3 in this way because they can participate in Div2 contest.

Although this, participants whose rating is 2099 should get <=200-th place in div2 contests to gain rating (Top 4% of all participants), and there's much risk to drop 100+ rating in single contest for them. So, after division revolution, I think some people whose result is unstable might not reach 2000 in this way.

, | 0

I think,here you wanted to write ABC-C == ARC-A & ABC-D == ARC-B .

, | +40

Finally, I wrote the extension version of this blog, from 1900 to 2200. I wrote it because I achieved 2200 recently.

Link :

I hope this is useful for many people.
Let's discuss about this in this Codeforces blog comment.

, | +5
, | 0
, | 0
, | 0
, | Rev. 3   0
, | Rev. 2   +3

, | 0
, | 0
, | +7 to write a new blog, "To become a red: A way to practice competitive programming, from 1500 to 2400".
, | +1

Wish you become red soon.

, | 0
, | Rev. 2   +22
, | 0
, | Rev. 2   +10
, | +13
, | +18
, | Rev. 5   +29 . Sorry for long waiting.
UPD 3: Published!

, | +10
, | +15 ( ဖ‿ဖ)人(စ‿စ )

, | +13
, | 0
, | 0
, | +3
, | 0
, | +3
, | 0
, | +14
, | 0
, | -10
, | Rev. 2   0
, | 0

TON

Name
  • REGISTER LOG IN
  • DESIGN CHALLENGES
  • DEVELOPMENT CHALLENGES
  • DATA SCIENCE CHALLENGES
  • COMPETITIVE PROGRAMMING
  • GET STARTED
  • DEVELOPMENT
  • DATA SCIENCE
 Match Editorial

Match summary

American (1-st, 4-th and 6-th places) and Chinese (2-nd and 3-rd places) coders occupied most of the top spots for this SRM. neal_wu won the match having 5 successful challenges, crazyb0y was second, and ACRush was the third with the most impressive challenge phase of the day (+375 points). Rating favorite Petr was only 9-th, significantly lowering his rating. In Division 2, john_rapera and [Hanney] got the 1-st and 3-rd places thanks to high scores on all problems, while tgoulart was second thanks to a +150 challenge phase.

Value 250 Submission Rate 896 / 952 (94.12%) Success Rate 536 / 896 (59.82%) High Score oa12gb for 247.58 points (2 mins 49 secs) Average Score 203.43 (for 536 correct submissions)

As it often happens, to solution to the easy problem in Division 2 was pure brute force. You try all ways to split the number into 2 parts, multiply all digits in each of the parts, and check whether the results are the same. The only trick in this problem is to make sure that you don't leave any of the parts empty. See Archimedean1 's solution for an implementation.

Value 500 Submission Rate 318 / 952 (33.40%) Success Rate 288 / 318 (90.57%) High Score Archimedean1 for 469.43 points (7 mins 20 secs) Average Score 293.31 (for 288 correct submissions)
Value 250 Submission Rate 609 / 676 (90.09%) Success Rate 606 / 609 (99.51%) High Score ainu7 for 246.69 points (3 mins 18 secs) Average Score 193.17 (for 606 correct submissions)

This problem required basic knowledge of probability theory and combinatorics .

First, let assume we know the probability that team A will score a prime number of goals (lets call this probability Pa) and that team B will score a prime number of goals (Pb). Since those events are independent, the probability that at least one team scores a prime number of goals will be equal to Pa + Pb - Pa * Pb.

Now lets try to compute the probability that a team will score a prime number of goals. A 90-minute game contains only 18 5-minute intervals, and a team can score at most one goal during such interval, therefore a team can score at most 18 goals. Now we need to find all prime numbers Pi not greater than 18, compute the probabilities for each team to score exactly Pi goals, and sum those probabilities to get numbers Pa and Pb. To find primes you may either use the sieve of Eratosthenes, or just pre-code them into an array.

The last but not the least - how to compute the probability for a team with skill S to score exactly K goals during a game? Assume that we've selected K intervals and want to compute the probability that the team has scored in each of those K intervals and did not score during any other interval. This probability is equal to S K * (1 - S) (18 - K) (S K is the probability to score during K intervals, and (1 - S) (18 - K) is the probability not to score in any of other (18 - K) intervals). And the last step - since there are 18! / (K! * (18 - K)!) ways to select K intervals, the final answer is Pa = (Sum over all primes K) (18! * SkillOfTeamA K * (1 - SkillOfTeamA) (18 - K) / (K! * (18 - K)!). Of course, to compute Pb you'll need to replace SkillOfTeamA by SkillOfTeamB.

Value 1000 Submission Rate 145 / 952 (15.23%) Success Rate 21 / 145 (14.48%) High Score unbing for 838.05 points (13 mins 1 secs) Average Score 575.97 (for 21 correct submissions)

Brute force problems are my favorites - check all possibilities (different cakes with exactly K ingredients), find the one which will be eated by the largest number of friends and return. Oops, unfortunately we can have too many fruits, so we won't be able to check all possible cakes with 25 out of possible 50 ingredients within a reasonable time limit. On the other hand, I still have a feeling this problem can be brute-forced, and I try to use a brute-force solution when possible - since it is the easiest to implement and to verify.

If we can't check all possible cakes, maybe we can brute-force over the answer? There can be at most 20 friends, which screams 2^N algorithm. What if we'll try all possible groups (subsets) of friends, computing the number of 'bad' fruits (a fruit is bad if at least one person of the subset will not eat it). Then we discard subsets which result in less than K good fruits and return the maximal number of friends in other subsets.

The idea sounds good, but we need to make sure the solution will run in time. You can easily optimize computing the number of friends in a group, store the fruits someone doesn't like as a bitmask, memoize the fruits which are not liked by a group, don't check the groups which contain less people than the best answer we've already found, etc. You can even try binary searching over the answer, when on each step of binary search you check only groups of the same number of people. See leshiy239 's solution for an implementation.

Value 500 Submission Rate 324 / 676 (47.93%) Success Rate 81 / 324 (25.00%) High Score bmerry for 403.67 points (14 mins 37 secs) Average Score 264.75 (for 81 correct submissions)

This problem is a mix of a classical algorithm (BFS) and a complicated implementation. In therms of graph theory, the problem asks us to find the shortest path in a weighted graph, where each vertex is described by two parameters: the set of people who are on the entrance of the cave and by the position of the map (whether a person with a map is on the entrance or on the exit of the cave). In the initial position everybody is in the entrance and map is on the entrance as well, and at the end all people are at the exit with the map. Edges between vertices correspond to groups which pass through the cave, and you must be very careful to add only those groups which are allowed to do so.

To make your sol run in time, you may want precompute some oftenly used values - like the time needed by a group to pass the cave (time needed for group of people A, B, ... Z to pass the cave is equal to the maximum of two numbers - the time needed for group B, ... Z, which can be memoized, and the time for person A) or check whether the group can pass through. On the other hand, be careful not to "overoptimize" your solution. One of the most common mistakes was assuming the optimal solution will never require more than one person to carry the map back to the entrance. See bmerry 's solution for an implementation.

Value 1000 Submission Rate 89 / 676 (13.17%) Success Rate 31 / 89 (34.83%) High Score crazyb0y for 856.98 points (12 mins 1 secs) Average Score 577.63 (for 31 correct submissions)

This problem can be split into several logical parts. First, you need to parse the input, and enumerate all workers, silver and gold mines. Second, you need to check which mines can be assigned to each worker (this can be done, for example, by running a simple BFS starting at each of the workplaces).

And the last but not the simplest - you need to assign mines to the workers in an optimal way. If you were to assign workers to only one type of mines (for example, silver ones), you would have used bipartite matching algorithm, which was used multiple times in previous TopCoder problems. Since this problem asks you to assign workers to two differents types of resources, so you'll need to use a general version of bipartite matching - maximal flow algorithm .

First intention is to build a graph to represent our problem. This part is simple - each mine and each workplace will represent a vertex, and a worker vertex will be connected to a mine vertex only if the corresponding mine is reachable by worker. Since we want each unit of the flow to come through worker vertex and two mine vertices of different types, we may want to force it by connecting the source of the flow to all gold mines, and connecting all silver mines to the sink. To make sure that each mine is used only once, we will set the capacity of all edges to one unit.

It seems the graph we built will solve our problem, but after some testing you may notice it sometimes returns answers greater than the correct one. For example, for K = 5 and the following map:

our algorithm will return 2. It is easy to find the reason: our graph looks as the following (blue circle represents source, yellow - gold mines, black - worker, grey - silver mines, green - sink).

topcoder problem solving

It is clear why we do return 2: because our network allows worker to work on 2 gold and 2 silver mines at ones. We need to change our network a bit to limit workers to at most one gold and one silver mine. This can be done by adding a special vertex for each worker, connecting it to the initial worker vertex by an extra edge of capacity one, and redirecting all worker's flow through that edge:

topcoder problem solving

Once you get the idea and build a proper network, the rest of the solution is just implementing a reasonably fast maximal flow algorithm, which shouldn't be a problem if you got so far (if it IS a problem, just implement it 3-5 times and the problem will disappear. The examples of the implementation can be found either in our tutorial, or in Petr 's solution ).

Author

topcoder problem solving

Are we close to having machines solve TopCoder problems?

Alexander Skidanov

Alexander Skidanov

Hi, Alex from NEAR is Here,

We’re working on teaching machines to program . A particularly exciting sub-project of that is teaching machines to solve competitive programming problems.

Competitive programming as a benchmark

With the emergence of deep learning, neural networks started performing almost at a human level in many tasks: visual object recognition, translation between languages, speech recognition, and many other. One area where they haven’t shown anything exciting yet is programming.

What does it mean to solve programming? Here we propose one benchmark: the ability of a machine to solve competitive programming problems. When you hear “competitive programming”, you probably think about complex dynamic programming and min-cost-max-flow problems, but here we are not talking about those. Instead we are concerned with the simplest problems offered at the programming competitions. Such problems generally involve simple manipulation with arrays, as well as some basic knowledge of number theory, geometry and algebra. Even this is actually very hard for computers, and we will talk about why below in the Open Challenges section.

State-of-the art

The area of research that is tasked with automated program generation is called Program Synthesis. The two most common sub-areas include programming from examples (synthesizing a program from a few input/output examples) and programming from description (synthesizing a program from plain English text).

Programming from examples has a long history. One known example that you can run in your browser is Magic Haskeller , which is a very sophisticated system that synthesizes rather nontrivial Haskell programs from just one example.

There were some applications of program synthesis from example in commercial products. Modern distributions of Excel come with a feature called FlashFill. If you have a column of names, and a column of last names, and enter an email in the third column in a form of “[email protected]”, FlashFill will immediately synthesize a program that concatenates the first letter of the first name with a dot, the last name and the “@gmail.com” and suggest to auto-fill the rest of the column. This looks like magic, and took more than a year of work for a very strong team of program synthesis experts at Microsoft Research to deliver it.

Ultimately the lab that created FlashFill created a general purpose framework PROSE in which one can create services like FlashFill by describing a domain-specific language and writing few C# functions.

A separate paper from a different lab at MSR called TerpreT serves as a great review and comparison of different approaches to programming from examples. It compares using SMT solvers, linear programming and neural networks, and shows that as of today using more traditional approaches such as SMT solvers still noticeably outperforms deep learning approaches.

An early attempt to apply programming by example to solving competitive programming is a paper from the same lab called Deep Coder . It can synthesize short programs for very simple problems by seeing just a few examples, and uses a combination of both deep learning and several traditional approaches.

Another great inspiring example of applying program synthesis from examples is a paper called Chlorophyll , in which the technique is applied to optimizing assembly programs. It does it in the following way:

  • Given a short program that needs to be optimized and a few tests (possibly zero), synthesize the shortest program that is consistent with the existing tests.
  • Using an SMT solver, try to prove that the synthesized and the given programs produce the same output on all possible tests. If proven, the synthesized program is an optimized version of the given program. If disproved, the SMT solver would find a test on which the two programs produce different output. Add the test to the set of tests and go to (1).

Mind-blowingly, not only this works, it generally converges for short programs in very few iterations!

Programming from description is a more recent area of research. Until the emergence of Deep Learning few years ago there was no sufficiently general way of extracting information from natural language. Arguably, even with the modern Deep Learning approaches, natural language understanding is still at a pretty early stage, which is one of the major limitations.

There were papers that attempt to solve synthesis of SQL , BASH and Java from description, but they all face the challenges described below. To my best knowledge, no application of synthesis from description appears in any commercial products today.

Open Challenges

When we talk about programming from description, there are several big challenges, all remain mostly unsolved as of today.

1. Lack of data

This might sound crazy — GitHub has so much code that even just crawling all of it is a non-trivial task, how could the data be lacking? But as a matter of fact, the data that is readily available, such as GitHub or StackOverflow, is not immediately usable because it is very noisy. Here are some datasets that we considered, and what challenges they come with:

  • Small commits that fix a simple bug, and the text of the associated issue. The person who fixes a bug has a lot of context about how the code operates. This context varies drastically between projects, and without it even an experienced human expert would not be able to predict the change in the code given the issue text.
  • Commit messages and the code. Besides commits also depending significantly on the context (i.e. a human expert often won’t be able to predict the code in the commit given a well-formed commit message), this dataset also has a lot of noise. People often provide incorrect commit messages, squash multiple features and fixes into one commit describing only one feature, or generally writing something like “Fixing a bug we found yesterday”.
  • Docstrings and function bodies. This one was very promising, but has two issues: a) docstring describes how a function shall be used, not how it is implemented, and predicting code from the usage pattern is a harder task than predicting code from a task description; and b) even in very good codebases quality docstrings are usually only provided for the public APIs, and the internal code is generally way less documented.

On the other hand, there are competitive programming archives. Competitive programming as a dataset has several advantages:

  • The code is short and self-contained.
  • No context besides the problem statement is needed to write it.
  • The dataset of statements and accepted solutions is very clean — accepted solutions almost certainly solve the problem from the statement.

There are however some challenges:

  • While the number of solutions is very high (CodeForces alone has dozens of millions), the number of different problems is somewhat low. Our estimate suggests that the total number of different competitive programming problems in existence is somewhere between 200k and 500k, with ~50k being attainable with solutions when a reasonable effort is made. Only 1/3 of those problems are easy problems, so we are looking at having ~17k problems available for training.
  • The statements contain a lot of fluff. Alice and Bob walking on a street and finding a palindrome laying around is something I’ve had in my nightmares on multiple occasions. This unnecessary fluff paired with relatively low number of problem statements further complicates training the models.

The lack of data is also the primary reason why program synthesis is not a popular area of research, since researchers prefer to work on existing datasets rather than figuring out where to get data from. One anecdotal evidence is the fact that after MetaMind published the WikiSQL dataset , multiple papers were immediately submitted to the coming conferences, creating a minor spike in program synthesis popularity, despite the fact that the quality of the dataset is very low.

Having said that, annotating the competitive programming dataset to a usable state would increase the popularity of the field, bringing closer the moment when we are competing against bots, and not just humans.

2. External Knowledge

Consider the following problem that was recently given on CodeForces: given an array of numbers of size 5000, how many triplets of numbers are there in the array such that the XOR of the three numbers is zero, and the three numbers can be the sides of a non-degenerate triangle.

This is Div1 A/B level, where most people with experience can solve it easily. However from a machine perspective it is extremely hard. Consider the following challenges:

  • The model would need to realize that it doesn’t need to fix all three numbers, it is sufficient to fix two numbers, and check if their XOR exists in the array. (this is besides the fact that the model would need to understand that fixing three numbers does not fit into the time limit)
  • The model would need to somehow know what it means for three numbers to be sides of a non-degenerate triangle.

Out of 50k problems that we have collected, only few had used that particular property of XOR in a similar way, and only a few dozen were in some way referring to the property of the sides of a triangle. To make a machine learning model be able to solve such a problem, one of the three things will need to happen:

  • We will find a way to learn from few examples. One-shot learning is a hot topic of research, with some recent breakthroughs, but no existing approach would be immediately applicable here.
  • We will find a way to provide the model with some external knowledge. This is an area that hasn’t been researched much, and even figuring out how that knowledge shall be represented is a challenging research task.
  • We will find a way to augment the dataset in such a way that a single concept that occurs only a few times in the dataset instead appears in a variety of contexts.

All three of those are open challenges. Until they are solved, we can consider an easier task: solving a competitive programming problem that is (either initially, or by the means of rewriting) very close to the solution, e.g:

“Given an array of numbers, are there two numbers a and b in that array such that c = a XOR b also appears in the array, and the largest number among a , b and c is smaller than the sum of the remaining two?"

Can we solve it? With the modern technology, not yet, and it makes sense to learn how to solve such problems before we even get to the more complex one-shot learning part.

3. Inherent uncertainty in Deep Learning models

Deep Learning models by design are probabilistic. Each prediction they make has some certainty associated with it, and therefore they generally keep having some chance of making a mistake even when trained well. If a model predicts code one token at a time, and a code snipped comprises 200 tokens, the model with 99% per-token accuracy would mess up at least one token with probability 87%. In natural language translation this is acceptable, but in Program Synthesis messing up one token most likely leads to a completely wrong program.

Notably, more traditional approaches from code synthesis (used primarily for programming by examples) don’t suffer from the same problem. Marrying classic programming languages approaches with deep learning approaches is very desirable, but at this time very little success was achieved.

Is it NEAR?

At NEAR, we are attempting to address many of the above problems. Here we will shortly cover our efforts that are relevant to solving competitive programming.

As we mentioned above, even though competitive programming data is rather clean, it has some unnecessary fluff in the statements that we’d love to get rid of. For that we asked the community to rewrite problem statements in such a way that only a very formal and dry description of what exactly needs to be done is left.

We also used help of the community to collect a dataset of statement-solution pairs in which no external knowledge (such as properties of XOR or triangles) is needed to write a solution given the statement. We plan to release a part of this dataset during NAMPI 2018 , so stay tuned.

This dataset is a set of problems with statements super close to the solutions. Such problems are easier for a machine than even the simplest real problems on a real contest, but this dataset not only serves as the first milestone (being able to solve it is a prerequisite to solving more complex problems), it is also a good curriculum learning step — a model that was taught to solve such problems is expected to pick up solving more complex problems more easily than a model that was not.

Data augmentation

To augment the dataset above, we created an algorithm that gets a solution as an input, and produces a very low level statement (very close to the solution) as an output. The generator is built in such a way that the statements generated are close in terms of certain metrics to what people have written. Training on such generated dataset achieves a non-zero accuracy on the human generated dataset, and the closer we get the generated statements to what people write in terms of the measurable metrics (such as BLEU score ), the better the accuracy of the trained model on the human-generated set is.

“Non-zero accuracy” might not sound very impressive, but if you consider the fact that it effectively means that the model manages to learn how to solve some (albeit very simple) human-generated problems by only being trained on a synthetic data, it is actually very promising. This is a large step towards solving more complex problems, and ultimately solving actual contest problems on a live competition.

Fixing the uncertainty of Deep Learning models

At the core of our approaches are deep learning models that read in text and produce code as either a sequence of tokens, or an AST tree. Either way, even a very well trained model has a very high chance of producing at least one wrong token while synthesizing an entire program.

We explore several approaches to address this problem. We presented one such approach in our ICLR workshop paper — the idea is to perform a beam search on AST trees until we find an AST of a program that passes sample tests. By the time we were publishing that paper we didn’t have a good human-annotated dataset yet, so all the results were presented on a semi-synthetic dataset, but the model itself was not changed much since then, and we still use it on the human-annotated data today.

Another approach we researched is letting another (or the same) deep learning model to fix the program if the first program that was generated doesn’t pass the samples. The high level idea is to train a model that takes as an input a problem statement and a program from the previous iteration alongside with some feedback on why the program is wrong, and generates a new program (either from scratch, or by producing a diff). We have a publication that reports some early results that was also accepted as a workshop paper at ICLR 2018 .

To get to some more interesting ideas, let’s consider us asking the model to implement a binary search. Imagine that it mistakenly swaps lines left = middle and right = middle . If you then feed the code back to the model, spotting this bug would be extremely hard. Even for humans it is a non-trivial task. So is the original source code the best medium to feed back to the model? One option we have been exploring is feeding an execution trace instead. If the model made the mistake above, the execution trace would always converge to one of the ends of the range instead of some value in the middle, which would provide way more information to the model than just the code itself. The challenge, however, is that execution traces of real programs are rather long, and condensing them to only show information that is likely to be relevant is an open and interesting challenge.

From competitive to industrial programming

To move from competitive to industrial programming, we established connections with a few high quality outsourcing and outstaffing companies, and now start providing mobile app development services with Silicon Valley enterprise-level service and low prices to companies in the United States.

These companies gain a point of contact in their time zone and protection against disappearing engineers and missed deadlines (we take the full hit in these cases, and have processes in place to complete the project under tighter deadlines using significantly more senior US-based engineers, without charging extra), while outsourcing agencies gain new customers, and a better organized process.

We came up with processes that enable project structure and documentation to be in a state that is most consumable by machines in the near future. This has a side benefit that the code ends up being structured and documented better, providing higher quality results for the customers.

If you have mobile app projects you need to deliver under tight budgets, make sure to send us a message at [email protected] .

Alexander Skidanov

Written by Alexander Skidanov

Text to speech

The Most Popular Coding Challenge Websites

Md. Fahim Bin Amin

If you want to improve your analytical skills, there's no better way to do that than solving problems.

If you are a programmer, then this is something you should do for yourself. Programmers need to deal with all sorts of problems almost every day.

Most importantly, solving problems in an efficient manner can make you much more productive. And solving challenging problems helps us do that.

You can watch this complete video on YouTube as well if you like 🎥

Why Should You Develop Your Problem-Solving Skills?

These days, technology is developing rapidly, and we are seeing some amazing changes and improvements almost every day.

Whenever we talk about technology, a buzzword appears in our mind – and that is coding or programming. Now, coding/programming isn't just about solving different kinds of problems using different programming languages, but it's a large part of what you'll do as a developer.

The fields of Web development, Machine Learning, Artificial Intelligence, Augmented Reality, App Development, and many others require strong problem-solving skills.

There are many popular websites that help you do that by providing various types of problems where you need to apply your analytical and mathematical skills to solve each problem using programming languages.

I am going to provide you with a list of coding challenge websites that will help you become more advanced day by day.

Keep in mind that these websites are useful for everybody, whether you are new to coding challenges or you are a professional programmer and so on.

  • Project Euler
  • GeeksforGeeks
  • Online Judge
  • HackerEarth
  • Code Jam - Google's Coding Competitions

Best Coding Challenge Websites

1. beecrowd (formerly uri).

beecrowd banner

beecrowd is perfect for those who have just started solving coding challenges and are looking for a beginner-friendly website. It used to be named URI , so there is a chance that you are already familiar with this site as URI.

If you want to solve problems in a specific category, then you're in luck as this website also offers that.

A dropdown showing the different challenge categories on beercrowd

Here is an image of a Strings problem set. You can also filter the problems by the ID (#), name (NAME), Subject (SUBJECT), solved (SOLVED), and so on. Beginners like these features very much.

2afljp6rrtm1c4co62vr

On this website, you can also take part in different programming contests, and check your global ranking, country-wide ranking, and university-wide ranking.

Also, you can check your progress, how many days have passed after signing up, how many problems you have solved, how many points you have got, and more.

You will also get a nice profile page that looks beautiful as well. 😊 I used to practice solving problems on this website when I was just starting out my CP (Competitive Programming) journey. Not to mention, I got the 3rd position among 1250 students back then at my university. 🎉

You can also check out my beecrowd profile here .

2. HackerRank

wla1ho0uoz9xuvp5iuwi

HackerRank is one of the most popular coding practice websites out there. This is a nice platform for everyone, especially beginners.

The website looks nice and polished, and the users who come here the first time don't struggle when navigating throughout the website, so that is definitely a positive thing here.

Login page

HackerRank offers different portals for companies and developers. If you are learning to solve problems, then you will choose the For Developers section.

If you want to learn any specific topics or programming languages, then this website is the perfect place to get started in that. You can prepare yourself by topics. You can also take their certification exam and stand out from the crowd. I have already passed their Python (Basic) certification exam.

Prep

You can also choose preparation kits from there, and prepare yourself before your interview if you want. Moreover, you can take part in programming contests.

Here, you will also get a nice personal profile page. You can check out my profile from HackerRank here .

My HackerRank profile

3. Codeforces

Codeforces Banner

Codeforces is one of the most used and well-known coding challenge and practice websites in the world, and it is sponsored by Telegram. Especially if you know about CP (Competitive Programming), then there is a high chance you have heard a lot about this website.

Although the website might look a little bit different to newcomers, you won't need much time to get used to it. You can train yourself by solving problems of different categories, difficulty levels, and so on.

Competitive programmers have ranks based on their successful results in programming contests. If you have heard about the RED coder / PURPLE coder, etc, then it is definitely from Codeforces.

Codeforces Ranking System

You can get the idea of the ranking system on Codeforces from the image above. For more details, you can check out this blog entry .

Codeforces arranges contests regularly each week, and they are categorized into div 1, div 2, div 3 and div 4. They also arrange global round and educational round contests. You can get the timeline of the contests directly from here .

Codeforces also provides a nice user profile on their website. You can check mine here as well.

4. LeetCode

Leetcode banner

If you are familiar with the FAANG (Facebook, Apple, Amazon, Netflix, Google) buzzword, then you should definitely know about this website! If you want to practice for your coding interview for the big giant tech companies like FAANG, then they all do leetcoding .

You might think that I have made a typo in the above paragraph. No, I didn't. LeetCode has become this popular among people who target FAANG and those who are working on their problem solving skills. Taking part in contests on LeetCode has become common, and people call it leetcoding!

Here, you can solve a lot of problems, and filter the problems by the lists, difficulty levels, status, and tags.

LeetCode ProblemSet1

You can also choose problems regarding Arrays, Strings, Hash Tables, Dynamic Programming, and many other categories.

LeetCode ProblemSet2

As I mentioned above, you can also take part in programming contests. The only thing that makes LeetCode different is that it is based on Algorithm practice. Yeah, LeetCode is not like any other coding website, because it focuses on algorithm practice alone.

You do not need to provide the full code for solving a problem here, you just need to crack the solution by providing a valid algorithm using any popular language that can solve the problem.

You also get to see how your code performs among others, how much space and time it takes, and so on.

Most importantly, LeetCode has an amazing discussion group where people talk about their problems, solutions, how to improve their algorithms, how to improve the efficiency of their code, and so on. This is one of the most powerful features of LeetCode.

One sad part about LeetCode is that you will not get every feature for free! Yeah, it's true. You have to pay for it monthly or yearly to unlock all its features. There are a lot of problems you will find locked on the website. You can not unlock them if you do not purchase the premium plan.

LeetCode pricing

If you are just starting your algorithm journey on LeetCode, then actually you don't need to worry about their premium plans as the free version will be more than enough for you.

Later, if you want to become more serious, then paying for their premium subscription will be a big deal actually as you'll get a ton more features. This is very much helpful, and includes things like top interview questions, top FAANG questions, video explanations, and more.

You also get a nice profile page on LeetCode. You can check out mine here .

My LeetCode profile

I was pretty confused before writing this section, as Kaggle is not a typical website for coding practice. This website is basically for Data Science, and it's one of the most popular websites out there for this.

Kaggle is an online community platform for data scientists and machine learning enthusiasts.
It is a popular crowd-sourced platform to attract, nurture, train, and challenge Data Science and Machine Learning enthusiasts from all around the world to come together and solve numerous Data Science, Predictive Analytics, and Machine Learning problems.

So if you are interested in Data Science, then you should check this website. Here you can check others' notebooks, submit your notebook, join in the contests, improve datasets, and so on.

Kaggle allows users to collaborate with other users, find and publish datasets, use GPU integrated notebooks, and compete with other data scientists to solve data science challenges.

Also, if you are interested in data science, but don't know where to start, then don't worry! Kaggle has got you covered. You can check their learning section where they have many free courses which will teach you a lot of stuff from the beginning.

kaggle free courses

✨ BONUS: If you want to learn more then I'd suggest that you complete the data science playlist from freeCodeCamp's YouTube channel.

fcc courses

Kaggle also provides rankings and a nice user profile. You can check out my profile here .

FBA kaggle

6. CodeChef

CodeChef banner image

CodeChef is another popular Indian website like HackerRank where you can solve a lot of problems, take part in contests, and so on.

You can filter the problems based on different categories and solve them using any of the most popular programming languages.

They also have a learning section on their website where you can learn how to solve problems in a systematic way. This is super helpful, especially for beginners.

In their learning section, you can choose self-learning, mentored learning, and doubt support. Some of them are free of charge, but in some courses, you have to pay before you can start them.

mentor price

This website also provides user ranking including the global ranking and country-wide ranking. They also provide a user profile on their website. You can check out mine here although I am not active on most of the websites right now. 😅

codechef fba

AtCoder is a programming contest website based in Japan. Makoto Soejima (rng_58) who is one of the former admins and problem writers from Topcoder is a founding member of AtCoder.

On this website, you can take part in different programming contests. They held regular programming contests on Saturdays and Sundays. Also, you can solve problems from previously held programming contests.

I have seen a lot of people regularly participate in the programming contests and solve problems previously used in the contests regularly by solving problems on AtCoder. I also tried that for a while to check the efficiency, and truth to be told, it was really effective.

Here you can also check the global ranking. Here you will also get your own profile page where you and others can see your global ranking and so on.

8. Topcoder

Topcoder banner image

Topcoder (formerly TopCoder) is a crowdsourcing company with an open global community of designers, developers, data scientists, and competitive programmers. Topcoder pays community members for their work on the projects and sells community services to corporate, mid-size, and small-business clients.

Here you can earn, learn, and do a lot more in their MVP program. For earning, you can participate in five different tracks, become a copilot, become a reviewer, and also get a freelance contract gig through Topcoder Gig Work .

Personally, I feel this website is a little bit overwhelming for beginners. You can get more details in the YouTube videos I have made for you.

9. Coderbyte

Coderbyte banner image

Coderbyte has a huge collection of problems that you can solve. They also offer a challenging library, starter courses, interview kits, career resources and so on.

To get all the features, you need to buy a subscription plan from them. I personally liked their interview kit a lot.

Interview kits

Here you will also get a personal profile page.

10. Project Euler

Project Euler banner image

Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve.

Project Euler is a great website for solving mathematical challenging problems. But solving a problem on this website requires more than just simple mathematical knowledge.

If you want to solve mathematical problems in a more analytical way, then this website will come in handy.

Problem set

11. Codewars

Codewars banner image

Codewars is a coding challenge website for people of all programming levels. It claims to have a community of over 3 million developers.

One of the biggest benefits of this website is that it is highly focused on algorithms like LeetCode. Moreover, if your goal is to get very good at writing clean and efficient programs, then this website can be a great asset to you.

In Codewars, you will see Kata and Kyu a lot.

Kyu (or Kyū) indicates the number of degrees away from master level (Dan). This is why they count downward. Once you reach master level, we count upward. Black belts in martial arts are Dan level.
On Codewars, kata are code challenges focused on improving skill and technique. Some train programming fundamentals, while others focus on complex problem solving. Others are puzzles meant to test your creative problem solving, while others are based on real world coding scenarios.

If you want to know more about how the ranking system works on Codewars, then simply check their docs here .

On Codewars you will also get a nice profile page like mine . Keep in mind that I haven't solved that much on this website; therefore my profile page would seem empty. 😅

Additionally, I find their leaderboard page quite amusing.

SPOJ banner image

SPOJ is a website that contains huge problems for solving. It claims to have 315,000 registered users and over 20,000 problems.

According to GFG,

You can start solving problems with maximum submission and follow or check the submission of good coders here. Once you solved around 50-70 problems and build some confidence, you can participate in different contests.

Their problem set is also quite amusing.

SPOJ problem set

You will also get a nice user profile page here which you can use to showcase your problem solve skills.

13. CodinGame

CodinGame banner image

In CodinGame, you can improve your coding skills with fun exercises in more than 25 programming languages.

It is a good website for intermediate and advanced software engineers to have fun while continuing to keep their skills sharp. Also, the challenges are gamified and the multiplayer access means that users can challenge friends and coworkers.

14. GeeksforGeeks (Popularly known as GFG)

GeeksforGeeks banner Image

You might wonder why I am including GFG in this article as it only provides algorithms, tutorials, and so on.

Well, that's not all they offer. Yes, GFG is pretty popular for its tutorials, algorithms, and so on, but they also provide a nice problem-solving platform here .

practice GFG

You can also filter the problems as you see fit for yourself.

GFG filter

You will also get your profile page where you can show your progress in problem solving on the GFG website.

Toph banner image

Competitive programmers participate in programming contests and solve many problems on this website. This website is kind of special to the Bangladeshi people as the Bangladeshi universities arrange many programming contests through it.

You can solve problems in different categories on this website, and they also offer you a nice profile page. They also provide rankings based on your performance in the programming contests.

If you are a complete beginner in problem solving, then this website can help you a lot in starting your problem solving journey.

16. LightOJ

LightOJ banner image

In LightOJ, you can solve a lot of categorized problems. It is highly based on solving algorithmic problems. Their problems are categorized as below:

  • LightOJ Volumes
  • Advanced Search Techniques
  • Data Structures
  • Divide And Conquer
  • Dynamic Programming
  • Fast Fourier Transform
  • Flow/Matching
  • Game Theory
  • Graph Theory
  • Parsing/Grammar
  • Recursion/Branch and Bound

They also provide you with a nice profile page where you can see your activities. It might seem odd, but sometimes I find this website better than LeetCode in some cases. Moreover, everything you do on this website is completely free of cost!

17. Exercism

Exercism banner image

You can develop your programming fluency in 57 different programming languages with their unique blend of learning, practice and mentoring.

Exercism is completely free of cost, and it's built by people like us. You can also contribute or donate to them to support their amazing service for free.

They also provide a very nice user profile page which also shows everything you have done on their website, starting from publishing to maintaining.

On their tracks page, you will get a list of 57 different programming languages where you can start your practice.

Solving problems on their website seems super fun to me. I really liked the way they manage their website.

18. Online Judge (Commonly known as UVa)

Online Judge banner image

This is one of the oldest websites out there for solving programming-related problems. I still find it to be a very hard website for beginners. The UI and navigation of the website are also very old.

All of the questions come with a PDF here. You need to download the PDF file of the problem if you want to solve problems as they do not offer a direct preview of the questions.

They have a lot of problemsets on their website . I still find a lot of users using this website nowadays. Therefore, I mentioned it here.

19. HackerEarth

HackerEarth banner image

HackerEarth is an Indian software company headquartered in San Francisco, US, that provides enterprise software that helps organisations with their technical hiring needs. HackerEarth is used by organizations for technical skill assessment and remote video interviewing.

You can practice your problem solving skills from their practice page. Also, you can participate in programming challenges and hackathons from their challenges page.

HackerEarth challenges page

Their interview prep section is quite amazing. You can take part in the mock assessments for the Adobe Coding Test, Facebook Coding Test, and Amazon Coding Test.

They also provide a nice user profile for everyone.

20. Code Jam - Google's Coding Competitions

Code Jam banner image

Google Code Jam is an international programming competition hosted and administered by Google. The competition began in 2003. The competition consists of a set of algorithmic problems which must be solved in a fixed amount of time.

If you are interested in taking part in the Code Jam contests, then their archive section is full of amazing resources for you where you can get the earlier questions and practice them.

They also offer a lot of prize money in their contests. An example can be:

Out of thousands of participants, only the top 25 will head to the World Finals to compete for the title of World Champion and cash prizes of up to $15,000. And there will be plenty of other prizes to go around — the top 1,000 competitors will win an exclusive Code Jam 2022 t-shirt.

21. ICPC - International Collegiate Programming Contest

ICPC banner image

ICPC is one of the most prestigious programming contests in the world.

The International Collegiate Programming Contest, known as the ICPC, is an annual multi-tiered competitive programming competition among the universities of the world.

Who is eligible for ICPC?

ACM/ICPC is a team-based competition with certain requirements to the participants: only post-secondary students and first-year post-graduate students no older than 24 are eligible; each team consists of three members. One can participate in the finals no more than twice and in the regionals no more than five times.

Personal Opinion

If you are a complete beginner, then start with beecrowd . If you want to start problem solving along with learning a specific programming language, then start with HackerRank .

After solving almost 50+ problems on beecrowd or HackerRank, start solving problems on Codeforces . The first time, you won't be able to do that well in the programming contests on Codeforces, and that is completely okay – it is natural. You just need to try regularly. The questions might seem pretty hard to you, but it'll become easier day by day after solving problems continuously.

You can participate in AtCoder the day you start solving problems on Codeforces. You can also try CodeChef , but I find Codeforces is enough in this case.

This will prepare you for the ICPC and Code Jam . Don't forget to solve the earlier questions on Code Jam.

If you want to gain expertise in Data Science, then simply go for Kaggle .

If you want to gain expertise in Algorithms, then LeetCode , and LightOJ are your only places. GeeksforGeeoks will also help you in this aspect.

For LeetCode, get some help from Nick White . His LeetCode Solution playlist has 189 videos as of today, and you will learn a lot from him, trust me!

Another good resource is Neetcode where you can get curated problems and their solutions from LeetCode. The official YouTube channel of Neetcode is also a great channel.

Additional Websites

You might find the websites below useful too!

⭐ StopStalk

StopStalk banner image

This website retrieves your friends' recent submissions from various competitive websites (Such as Codeforces, SPOJ, HackerRank, Timus, and so on) and shows all of them in one place. You can check my StopStalk profile from here .

⭐ CodersRank

CodersRank banner image

This is a platform made to help developers in job-seeking and professional growth. Here, your CodersRank profile serves as a proven track record of your coding knowledge.

You have to connect your private and public repositories here from GitHub to generate your true CodersRank profile. You can also check my CodersRank profile from here .

Thanks for reading the entire article. If it helps you then you can also check out other articles of mine at freeCodeCamp .

If you want to get in touch with me, then you can do so using Twitter , LinkedIn , and GitHub .

You can also SUBSCRIBE to my YouTube channel (Code With FahimFBA) if you want to learn various kinds of programming languages with a lot of practical examples regularly.

If you want to check out my highlights, then you can do so at my Polywork timeline .

You can also visit my website to learn more about me and what I'm working on.

Thanks a bunch!

Read more posts .

If you read this far, thank the author to show them you care. Say Thanks

Learn to code for free. freeCodeCamp's open source curriculum has helped more than 40,000 people get jobs as developers. Get started

Navigation Menu

Search code, repositories, users, issues, pull requests..., provide feedback.

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly.

To see all available qualifiers, see our documentation .

topcoder-solutions

Here are 16 public repositories matching this topic..., shubhamk0027 / cpp-codes.

The repository contains common data-structures, algorithms and implementations of the popular problems in C++. The Repository also contains graphic programming codes, contest solutions like of Euler Plus on HackerRank and some coursera competetive programming course solutions.

  • Updated Oct 30, 2020

NKH123 / Competitive-Programming

Contains solutions to problems from Codeforces, HackerRank, CodeChef and HackerEarth.

  • Updated Sep 12, 2020

907th / code-challenges

My own solutions for the code challenges (HackerRank, LeetCode, CodeForces, TopCoder, Timus, etc.) and my educational projects live in this repository.

  • Updated Nov 10, 2023

eqan / Competitive-Programming

All of my online competitive programming progress and solution stored here

  • Updated May 6, 2023

freedomDR / coding

  • Updated Apr 2, 2024

skysign / WSTT

We Solve Topcoder problems Together

  • Updated Dec 24, 2019

dvdantunes / topcoder-challenges

Problem resolution from topcoder challenges

  • Updated Oct 10, 2018

WojciechMigda / TCO-Ringbeller

  • Updated Dec 28, 2020

WojciechMigda / TCO-CustomerChurn

Customer Churn (Drop Off) Modeling

  • Updated Nov 22, 2020

emli / topcoder

My topcoder SRMs solutions

  • Updated Apr 10, 2021

miretteamin / TopCoder-Problems

  • Updated Dec 22, 2020

reyeon1209 / Algorithm_Study

  • Updated Jun 1, 2020

akashpmani / Daily-Dose-Of-DS

Collection of DSA questions from competitive coding websites and simple and basic data structures to ace the coding interview!

  • Updated Oct 13, 2023

WojciechMigda / TCO-Ringbeller-legacy

Submission to the Ringbeller IoT - Cellular Capabilities C++ library challenge hosted by TopCoder.

  • Updated Dec 16, 2020

WojciechMigda / TCO-XMLProcessing

Solution to the "Offset Well Analysis - XML Data Extraction CLI" TopCoder competition

  • Updated Nov 24, 2020

madhuri-15 / TCO-C4G-breast-cancer-prediction

Topcoder's breast cancer prediction match solution with 97.09% accuracy

  • Updated Jan 4, 2023
  • Jupyter Notebook

Improve this page

Add a description, image, and links to the topcoder-solutions topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the topcoder-solutions topic, visit your repo's landing page and select "manage topics."

topcoder-color23

The future of work is here.

Start work faster, complete more projects, and scale productivity all on our secure platform..

Our problem-solving experts will cover:

  • The amazing talent our community offers 
  • Topcoder's transformative methods
  • How communication, knowledge share, and workflows operate on Topcoder
  • Our streamlined task integrations
  • Our easy to use application
“Opportunities like topcoder, and tapping the gig economy. The more brains you can bring to the table, the more creativity and better solutions you get." Bryan Fleming - SVP, Product & Technology, T-Mobile
  • Stack Overflow Public questions & answers
  • Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers
  • Talent Build your employer brand
  • Advertising Reach developers & technologists worldwide
  • Labs The future of collective knowledge sharing
  • About the company

Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Get early access and see previews of new features.

TopCoder solution with dynamic programming solution

I'm trying to solve this topcoder problem. I have read the solution analysis but still cannot understand.

The basic idea of the solution is to think backwards and insert element instead of deleting. But how can this reduce the complexity of the problem ?

I do understand that this is a dynamic programming problem. I read on the wikipedia that DP problem avoid solving sub problems repeatly and thus reducing the complexity. But I do not see any sub problem redundency here.

Problem Statement The Casket of Star (sic) is a device in the Touhou universe. Its purpose is to generate energy rapidly. Initially it contains n stars in a row. The stars are labeled 0 through n-1 from the left to the right. You are given a int[] weight, where weight[i] is the weight of star i.

The following operation can be repeatedly used to generate energy:

Your task is to use the device to generate as many units of energy as possible. Return the largest possible total amount of generated energy.

McBear Holden's user avatar

  • 1 Think about n = 3 . Then think about n = 4 , remembering what you've already thought about. Then think about n = 5 , remembering what you've already thought about. Then think about all the things you've thought about so far. –  AakashM Mar 2, 2012 at 9:22
  • OK I can see why there's repeated computations: if we have 3 5 6 7 8 9 2and pick 5, then we have 3 6 7 8 9 2; if we pick 6, then we have 3 5 7 8 9 2; in both case, the sub sequence 7 8 9 2 gets computed . –  McBear Holden Mar 2, 2012 at 10:03

The sub-problem f(start,end) is to work out the most energy that can be got from deleting all the interior stars in the range [start,end]. (An interior star is any star except for the endpoints.)

There are n stars so there are about n*n/2 of these sub-problems.

The original problem is the answer to the sub problem with start=0 and end=n-1.

The sub-problems can be solved by considering all choices for the last node to be deleted. For each choice x we add the cost f(start,x) of deleting stars before x, and the cost f(x,end) of deleting stars after x, and the cost weight[start]*weight[end] of deleting x itself.

This takes O(end-start) operations so the entire problem can be solved in O(n^3)

Peter de Rivaz's user avatar

  • Hi peter, how do you calculate f(start,x) and f(x,end)? by recursive methode ? –  McBear Holden Mar 2, 2012 at 22:45
  • Recursive would certainly work. (Make sure that you save the results of calculating a sub-problem or you will repeat a lot of calculations.) Alternatively, you can avoid the function call overhead by iterating over the length (start-end) of the subproblem, and iterating over the start point, and saving the results in an array. –  Peter de Rivaz Mar 3, 2012 at 9:47

Your Answer

Reminder: Answers generated by artificial intelligence tools are not allowed on Stack Overflow. Learn more

Sign up or log in

Post as a guest.

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy .

Not the answer you're looking for? Browse other questions tagged algorithm or ask your own question .

  • Featured on Meta
  • The 2024 Developer Survey Is Live
  • The return of Staging Ground to Stack Overflow
  • The [tax] tag is being burninated
  • Policy: Generative AI (e.g., ChatGPT) is banned

Hot Network Questions

  • How big can a chicken get?
  • What did the old woman say in "73 Yards"?
  • Is the B-theory of time only compatible with an infinitely renewing cyclical reality?
  • How to negotiate such toxic competitiveness during my master’s studies?
  • Structure that holds the twin-engine on an aircraft
  • Sum of square roots (as an algebraic number)
  • How does Wolfram Alpha know this closed form?
  • Movie I saw in the 80s where a substance oozed off of movie stairs leaving a wet cat behind
  • siblings/clones tour the galaxy giving technical help to collapsed societies
  • Has a country ever by its own volition refused to join the United Nations?
  • What do humans do uniquely, that computers apparently will not be able to?
  • Was it known in ancient Rome and Greece that boiling water made it safe to drink and if so, what was the theory behind this?
  • Why are ETFs so bad at tracking Japanese indices?
  • Why aren't tightly stitched commercial pcbs more common?
  • In the Unabomber case, was "call Nathan R" really mistakenly written by a New York Times intern?
  • Can we combine a laser with a gauss rifle to get a cinematic 'laser rifle'?
  • Found possible instance of plagiarism in joint review paper and PhD thesis of high profile collaborator, what to do?
  • Have any countries managed to reduce immigration by a significant margin in the absence of economic problems?
  • How do Authenticators work?
  • Why is finding a mathematical basis for the fine-structure constant meaningful?
  • Strange Bench Press
  • Are dichotomous categorical variables technically interval/continuous measures?
  • Create repeating geometry across a face
  • Can secondary dominant have 2 tritones with addition of b9?

topcoder problem solving

You are using an outdated browser. Please upgrade your browser to improve your experience.

How to challenge others in coding or improve my code problem solving abilities !

AyanSiddiqui

I think you're talking about competitive programming. Try this forum .

And don't miss all our amazing tutorials and help articles here .

aakash855

Choose one Programming Langauage, To be done expert, intermediate and advanced level on that you chosen programming language. Done algorithms , data structures and dynamic programming with that programming language you chosen. Pratice on competitive websites crack challenges

Start challenging other, You will be the winner.....

hardyian

A few techiques that might or might not work:

  • Look at existing solutions to common problems, e.g. design patterns. Maybe you find something similar that at least partially resembles your problem. Search the web.
  • Act as if the problem has already been solved, and trace what follows back to the solution to make. For example, instead of designing the API for a class, just write the code that makes use of the class, with method calls as you would like them, and then implement that API.
  • Do something else, e.g. surf the net or play solitaire, and wait for inspiration to happen.
  • Think of the person you like most, and pretend you want to impress her with your problem solving skills. What would be an extremely impressive solution?
  • Check the problem for inherent contradictions or conflicting requirements, and state exactly what they are and what compromise could be made. Often, when such conflicts exist, but you are not aware of, you tend to discard one possible solution after another because you cannot perfectly satisfy all requirements.
  • If you already have a possible solution, but it feels "dirty" (copy-paste, global variables, spaghetti code etc.), use it anyway and make it better afterwards.

And i recommed html tutorial for beginners may help you. Start working on the skill of identifying problems as well.

Category:TopCoder Problems

This is a list of problems from the TopCoder website. On that website you can also find

  • a great automatic judge (requires Java plugin)
  • discussion of how to solve many of the problems (there is usually a commentary after each match)
  • access to other people's solutions if you are truly stuck!

This list will be especially useful for Java programmers since most online judges do not handle that language very well.

Div I Level 3 is the hardest and Div II Level 1 is the easiest.

Subcategories

This category has the following 6 subcategories, out of 6 total.

  • TC Div I Level 1
  • TC Div I Level 2
  • TC Div I Level 3
  • TC Div II Level 1
  • TC Div II Level 2
  • TC Div II Level 3

Pages in category "TopCoder Problems"

The following 24 pages are in this category, out of 24 total.

  • TC CDPlayer
  • TC ChangingString
  • TC Chessboard
  • TC CsCourses
  • TC CssPropertyConverter
  • TC DegreesToRadians
  • TC DrivingAround
  • TC FairTournament
  • TC KLastNonZeroDigits
  • TC LandAndSea
  • TC MoneyGame
  • TC PersistentNumber
  • TC ProblemsToSolve
  • TC QuantumAlchemy
  • TC RefactorableNumber
  • TC ReverseResources
  • TC ReverseUnnaturalBaseConversion
  • TC SimpleRotationDecoder
  • TC TagalogDictionary
  • TC ValidPlates
  • TC VegetableGarden
  • TC VolleyballTournament
  • Template:TCProblem

Navigation menu

Guru99

Competitive Programming (Coding) for Beginners: What is, Top Website

Matthew Martin

What is Competitive Programming?

Competitive programming is a mind sport for solving coding problems using algorithms and data structure. The participants need to write code under various restrictions like memory limits, execution time, the limit of coding, space, etc. The winner of competitive programming is declared based on problems solved and time spent for writing successful programming solutions.

However, it also includes other factors like quality of output produced, execution time, program size, etc.

Benefits of Competitive Programming

Here are benefits of competitive programming:

  • Competitive programming helps you to improve your logical and analytical skills
  • It improves your algorithmic knowledge.
  • It is an excellent addition to your CV.
  • Improve your network of friends who are also passionate about programming
  • It is supported by world famous organizations like Google, Amazon, Facebook, IBM, and others.

History of competitive programming

In the competitive programme world, the oldest contest is ACM-ICPC (International Collegiate Programming Contest ). It was originated in the 1970s and has grown to span across 88 countries.

Interest in programming challenges has grown extensively after 2000. It was possible due to the growth of the Internet. It allows coding contest sites to hold international contests online.

Next in this Competitive programming tutorial, we will learn about skills required for competitive programming exam.

Skills Required in the Competitive Programming Exams

Skill Details
Important skills
Complete search
Divide and Conquer
Dynamic programming

How to get started?

Here, are some useful tips that you should know before getting started with Competitive programming:

  • It’s vital that you select a programming language which you are most comfortable with
  • Sign up on any online coding challenge website and start solving their practice problems
  • You need to learn about Data Structures which is vital to solving complex coding issues.
  • You need to understand the concept of complexity in programs.
  • Learn important programming patterns like recursion, Dynamic Programming, etc.

Top Competitive Programming Sites

Here are the best coding practice websites:

Hackerearth

Topcoder

Topcoder competitive programming is a widely popular platform for competitive programming. It is one of the best coding practice sites for beginners that offer a lot of algorithmic challenges that you can complete on your own using their code editor tool. The Topcoder practice website is better suited for an advanced audience.

Visit Here: https://www.topcoder.com/

Coderbyte

Coderbyte offers more than 200 various types of competitive programming questions and coding challenges which you can solve in an online editor using 10 different programming languages. It is one of the best competitive programming sites that provide official solutions and more than 800,000 user created solutions.

Visit Here: https://coderbyte.com/

Codewars

Codewars offer an extensive collection of coding challenges. You can submit your challenges which will be edited by the community. It allows you to solve these challenges online using their editor of 20+ programming languages.

Visit Here: https://www.codewars.com/

CodeChef

CodeChef offers hundreds of competitive programming challenges. It is one of the best site for competitive programming that allows you to write code in their online editor and view a collection of challenges. The coding problems are separated into different categories based on your skill level.

Visit Here: https://www.codechef.com/

Codeforces

Codeforces is a Russian based competitive programming course website. It regularly hosts coding contest where competitive programmers from all over the world.

Visit Here: https://codeforces.com/

Hackerearth

HackerEarth offers enterprise software solutions. It is one of the best coding challenge websites that help companies or individual with their innovation management and technical recruitment needs. HackerEarth Coding platform for beginners has conducted 10,000+ sports programming challenges to date.

Visit Here: https://www.hackerearth.com/

Myths and reality of competitive programming

Myths Reality
It’s too late to start competitive programming There is no fixed age for this best to start earlier in your programming career.
It is an excellent way to get a software programming job No, it is not true as it is a sport which may benefits. However, it doesn’t offer a job guarantee.
You need to solve lots of computing programs before starting competitive programming. You can learn theory, but you solving computing challenges will not help as every competition is unique with its unique Topcoder challenges.
You need to an expert in algorithm You need to be able to solve the problems
Competitive programmers are all experienced programmers. No, it is for everyone even beginner code can participate
It is just a hobby or a game Competitive programming, in contrast, covers some of the same skills taught in the computer science curriculum, but at a much deeper level. So, you can’t call it a game.

Best Practices for Competitive Coding exams

Although there is no fixed rule, still some best practices for Competitive programming that you should follow are:

  • Try to learn new and efficient algorithms and implement them when needed.
  • Develop a good knowledge of data structures like lists, trees, and graphs
  • Read the privacy information from the competitive programming website and contact them before signup.
  • You should select a problem for which you can find a solution and possibly an explanation of those solutions.
  • Write test cases for the problem and test your logic using those test cases before submitting.
  • You need to maintain pre-written templates for Standard algorithms, necessary headers, functions, etc.
  • Use functions/methods and minimize repetition of code.
  • Test your code for worst case and try to figure out the best solution for this situation

Drawbacks of competitive programming

  • Runtime Errors on problems with bad inputs are difficult to debug.
  • You are so used to small rewards and short-term goals. In real life when you work on any project, it mostly takes two-three months before you get the reward for the project you’re working on
  • You will likely become master of coding, but you won’t know any frameworks (important for real projects)
  • It is time-consuming and more tedious to participate, and you need to do it repeatedly.
  • Competitive programming is solving coding problems using algorithm and data structure.
  • Coding contests help you to improve your logical and analytical skills.
  • ICPC was originated in the 1970s and has grown to span across 88 countries.
  • Algorithm Skills, Basic Math Skills, Programming Skills, Typing Speed Skills are required in the competitive Programming Exams.
  • It’s crucial that you select a programming language which you are most comfortable with
  • The most popular Competitive Programming Websites are: 1)TopCoder 2) Coderbyte 3) Codewars 4) CodeChef 5) Codeforce 6) Hackerearth.
  • It is a common myth that it’s too late to start competitive programming. However, the reality is that there is no fixed age for it.
  • Develop a good knowledge of data structures like lists, trees, and graphs is a good best practice for competitive coding exams.
  • Perl Tutorial: Variable, Array, Hashes with Programming Example
  • WebPagetest API Tutorial with Example
  • Difference Between Waterfall vs Spiral and Incremental Model
  • Capability Maturity Model (CMM) & it’s Levels in Software Engineering
  • Incremental Model in SDLC: Use, Advantage & Disadvantage
  • What is RAD Model? Phases, Advantages and Disadvantages
  • Spiral Model: When to Use? Advantages and Disadvantages
  • What is Waterfall Model in SDLC? Advantages and Disadvantages

Technology Entrepreneurship: Lab to Market

Explore how entrepreneurs move technology from lab to market..

Taught by Harvard Business School faculty, this course teaches a systematic process for technology commercialization to bring innovations to the world.

Harvard Business School logo

What You'll Learn

Universities, government labs, and private companies invest billions of dollars in the research and development of breakthrough technologies that have the potential to transform industries and lives—but very few of these technologies ever leave the lab. Those that do often fail to find compelling market applications. So what determines success? How does an invention become an enduring innovation?

In this introductory course, developed in collaboration with the Laboratory for Innovation Science at Harvard and the University of California San Diego, you’ll explore how entrepreneurs match promising technology with customer needs to launch successful new businesses. Using real-world examples, you’ll apply critical thinking to commercialize technologies, and you’ll learn about the venture creation process from founders, funders, and industry experts.

The course will be delivered via edX and connect learners around the world. By the end of the course, participants will be able to:

  • Develop a systematic approach to technology entrepreneurship
  • Generate new use scenarios by matching customer needs with promising technology seeds
  • Align business and operating models
  • Evaluate a technology for readiness and market fit
  • Position opportunities to secure funding

Your Instructors

Karim R. Lakhani is a Professor of Business Administration at the Harvard Business School and one of the Principal Investigators of the Laboratory for Innovation Science at Harvard (LISH). He specializes in the management of technological innovation in firms and communities. His research is on distributed innovation systems and the movement of innovative activity to the edges of organizations and into communities. He has extensively studied the emergence of open source software communities and their unique innovation and product development strategies.

He has also investigated how critical knowledge from outside of the organization can be accessed through innovation contests. Currently, Professor Lakhani is investigating incentives and behavior in contests and the mechanisms behind scientific team formation through field experiments on the Topcoder platform and the Harvard Medical School. Professor Lakhani’s research on distributed innovation has been published in Harvard Business Review, Innovations, Management Science, Nature Biotechnology, Organization Science, Research Policy and the Sloan Management Review.

He is the co-editor of Perspectives on Free and Open Source Software (MIT Press), a book on community-based innovation. He has also published teaching cases on leading organizations practicing distributed innovation including: Data.gov, InnoCentive, Google, Myelin Repair Foundation, SAP, Threadless, TopCoder and Wikipedia. His research has been featured in publications like BusinessWeek, The Boston Globe, The Economist, Fast Company, Inc., The New York Times, The New York Academy of Sciences Magazine, Science, The Wall Street Journal, The Washington Post, and Wired. Professor Lakhani was awarded his PhD in management from the Massachusetts Institute of Technology. He also holds an MS degree in Technology and Policy from MIT, and a Bachelor's degree in Electrical Engineering and Management from McMaster University in Canada.

He was a recipient of the Aga Khan Foundation International Scholarship and a four year doctoral fellowship from Canada's Social Science and Humanities Research Council. Prior to coming to HBS he served as a Lecturer in the Technology, Innovation and Entrepreneurship group at MIT’s Sloan School of Management. Professor Lakhani has also worked in sales, marketing and new product development roles at GE Healthcare and was a consultant with The Boston Consulting Group. He was also the inaugural recipient of the TUM-Peter Pribilla Innovation Leadership Award.

Professor Vish Krishnan is an accomplished scholar and world-renowned consultant who has worked with the senior leadership at companies such as Nissan, Zeiss, Amylin Pharma, Motorola, and Sony on organizational, cultural, and digital transformation. He is currently Chaired Professor at the University of California, San Diego’s Rady School of Management and a faculty affiliate at the Harvard Business School. Vish Krishnan received his doctorate degree in engineering from the Massachusetts Institute of Technology, and has co-authored some of the most cited articles on the topics of innovation and product development/management.

He has also been asked to serve in editorial roles of prestigious management journals. His work with Dell Computer and other companies has been documented as a Harvard Business School case study and taught at a number of top universities. His work with 3M resulted in an appearance on the front page of the Wall Street Journal. Professor Krishnan worked with Nissan and Sony on the transformation and growth of their international businesses, including India and South Asia. Dr. Krishnan is the winner of several major teaching and research awards including the Most Valuable Professor award.

Ways to take this course

When you enroll in this course, you will have the option of pursuing a Verified Certificate or Auditing the Course.

A Verified Certificate costs $149 and provides unlimited access to full course materials, activities, tests, and forums. At the end of the course, learners who earn a passing grade can receive a certificate. 

Alternatively, learners can Audit the course for free and have access to select course material, activities, tests, and forums.  Please note that this track does not offer a certificate for learners who earn a passing grade.

Related Courses

Open innovation.

Open innovation is a strategy that suggests the best ideas, solutions, and people necessary to solve your organization’s difficult problems may come from outside your company entirely.

Entrepreneurship in Emerging Economies

Learn about prior attempts to address social problems, identify points of opportunity for smart entrepreneurial efforts, and propose and develop your own creative solutions.

Digital Health

Digital technologies and big data offer tremendous opportunities to improve health care.

COMMENTS

  1. Planning an Approach to a Topcoder Problem Part 1

    Topcoder is a crowdsourcing marketplace that connects businesses with hard-to-find expertise. The Topcoder Community includes more than one million of the world's top designers, developers, data scientists, and algorithmists. Global enterprises and startups alike use Topcoder to accelerate innovation, solve challenging problems, and tap into specialized skills on demand.

  2. The 10 Most Popular Coding Challenge Websites [Updated for 2021]

    The top ranked users on TopCoder are very good competitive programmers and regularly compete in programming competitions. ... Currently, if you don't solve the problem, then you can't see the solution of others. If you also try to check the editorial before solving the problem, then you won't get the point for solving the problem at all. ...

  3. Solving Complex Probems At Scale with Topcoder

    Check out The Forrester Total Economic Impact™ of Topcoder — which shows how Topcoder can boost your ROI by 113% on large enterprise crowdsourcing programs. Solving complex problems at scale is a Topcoder specialty. Our unique approach to crowdsourcing and has lead to many success stories, including this one!

  4. Solving Problems Using Constraint Logic Programming

    Topcoder is a crowdsourcing marketplace that connects businesses with hard-to-find expertise. The Topcoder Community includes more than one million of the world's top designers, developers, data scientists, and algorithmists. Global enterprises and startups alike use Topcoder to accelerate innovation, solve challenging problems, and tap into specialized skills on demand.

  5. James S. Plank, University of Tennessee

    Finding the problems on Topcoder You'll need to create an account at topcoder.com. ... Strings and problem solving. 63.0% - S - SRM 741, D2, 250-Pointer (DigitStringDiv2). Enumerating substrings and converting them to integers. 62.4% - S - SRM 696, D2, 250-Pointer (Ropestring). Counting rope lengths, and then using them to create a return string.

  6. PDF Using Topcoder in Introductory Data Structures and Algorithms

    Problem solving is in some respects an art more than a science, and is one of the hardest things to teach, and for that reason, having simple, interesting problems with multiple solutions can be an excellent teaching aid. For example, the problem òThreeTeleports presents a problem where the player must make their way home on a two dimensional ...

  7. how to get started with TopCoder to update/develop algorithm skills?

    12. TopCoder algorithm contests are a way to develop your coding speed. Solving any of the problems in the practice arena is difficult unless you already have knowledge of various algorithms. The problems on Project Euler suffer from the same flaw. You already have to know the algorithms to solve the problems in a reasonable time frame.

  8. [Tutorial] A Way to Practice Competitive Programming

    In order to solve problems, you should make a Bingo like example. In addition, most of these problem is easy, especially concept. ... You can use competitiveprogramming.info to solve TopCoder Div1Easy, and you can make spreadsheet like following picture to solve TopCoder. (This is example of Div1Med that I am using.) Step 4: Rating 1750 ...

  9. The 8 Best Coding Challenge Websites to Help You Level Up Your Skills

    Aside from solving challenges for fun online, they offer sponsored competitions where you can win prizes for writing the best solution. Great for. TopCoder is better suited for advanced programmers who are comfortable solving algorithm challenges dealing with advanced topics like graph search and number theory. Pricing / Premium content

  10. TopCoder Statistics: SRM 422 Problem Set & Analysis

    Match summary. American (1-st, 4-th and 6-th places) and Chinese (2-nd and 3-rd places) coders occupied most of the top spots for this SRM. neal_wu won the match having 5 successful challenges, crazyb0y was second, and ACRush was the third with the most impressive challenge phase of the day (+375 points). Rating favorite Petr was only 9-th ...

  11. Are we close to having machines solve TopCoder problems?

    If disproved, the SMT solver would find a test on which the two programs produce different output. Add the test to the set of tests and go to (1). Mind-blowingly, not only this works, it generally ...

  12. The Most Popular Coding Challenge Websites

    You can solve problems in different categories on this website, and they also offer you a nice profile page. They also provide rankings based on your performance in the programming contests. If you are a complete beginner in problem solving, then this website can help you a lot in starting your problem solving journey. 16. LightOJ

  13. topcoder-solutions · GitHub Topics · GitHub

    Problem resolution from topcoder challenges. topcoder programming-challenges topcoder-arena topcoder-solutions Updated Oct 10, 2018; Python; skysign / WSTT Star 1. Code Issues Pull requests We Solve Topcoder problems Together. topcoder topcoder-arena topcoder-solutions Updated Dec 24, 2019; WojciechMigda / TCO-Ringbeller Star 0. Code

  14. Book a demo with one of our experts

    Start work faster, complete more projects, and scale productivity all on our secure platform. Our problem-solving experts will cover: The amazing talent our community offers. Topcoder's transformative methods. How communication, knowledge share, and workflows operate on Topcoder. Our streamlined task integrations.

  15. TopCoder solution with dynamic programming solution

    I'm trying to solve this topcoder problem. I have read the solution analysis but still cannot understand. The basic idea of the solution is to think backwards and insert element instead of deleting. But how can this reduce the complexity of the problem ? I do understand that this is a dynamic programming problem.

  16. How to challenge others in coding or improve my code problem solving

    A few techiques that might or might not work: Look at existing solutions to common problems, e.g. design patterns. Maybe you find something similar that at least partially resembles your problem. Search the web. Act as if the problem has already been solved, and trace what follows back to the solution to make.

  17. Category:TopCoder Problems

    discussion of how to solve many of the problems (there is usually a commentary after each match) access to other people's solutions if you are truly stuck! This list will be especially useful for Java programmers since most online judges do not handle that language very well.

  18. Competitive Programming (Coding) for Beginners: What is, Top ...

    Competitive programming is solving coding problems using algorithm and data structure. The participants need to write code under various restrictions like memory limit. ... Topcoder competitive programming is a widely popular platform for competitive programming. It is one of the best coding practice sites for beginners that offer a lot of ...

  19. Technology Entrepreneurship: Lab to Market

    He is the co-editor of Perspectives on Free and Open Source Software (MIT Press), a book on community-based innovation. He has also published teaching cases on leading organizations practicing distributed innovation including: Data.gov, InnoCentive, Google, Myelin Repair Foundation, SAP, Threadless, TopCoder and Wikipedia.