Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does TopCoder evaluates code?

If you are familiar with TopCoder you know that your source-code gets a final "grade/points" this depends on time, how many compiles, etc, one of the highest weighted being performance. But how can they test that, is there some sort of simple code (java or c++) to do it that you could share for me to evaluate and hopefully write my own to test the programs I write for University?

This is sort of a follow up question to this one where I ask if shorter code results in best performance.

P.S: Im interested in both of how topcoders knows performance and writing code to test performance.

like image 600
Carlos Avatar asked Mar 09 '10 09:03

Carlos


People also ask

Is Topcoder good for beginners?

Is Topcoder good for beginners? It depends on your design needs. However, Topcoder offers enough practice problems of all difficulty levels to help build your skills.

What is Topcoder used for?

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.


1 Answers

They have a test framework that tests your code and measures the time it takes to run those tests. Once you submit your code, TopCoders machines will run a certain number of tests cases against it.

There is no human involved in measuring the performance. They test automatically how much time is spent only in your code.

Usually competitors have local test frameworks that gives them a pretty good idea of the performance of their code. Writing a simple test framework should not be a too difficult task.

like image 110
Tuomas Pelkonen Avatar answered Oct 09 '22 09:10

Tuomas Pelkonen