Large Inputs Time Bound Performance
-
I signed up recently on codility where programmers can learn writing algorithms and companies are use it to evaluate candidates for position, what i observed is that for normal inputs my solution always passes, but for very large input my code does not returns result within the time bounds they require, i wanted to know from what source we can learn our algorithm writing skills so that they return the result in the acceptable execution time. or what can be the approaches for that?
-
I signed up recently on codility where programmers can learn writing algorithms and companies are use it to evaluate candidates for position, what i observed is that for normal inputs my solution always passes, but for very large input my code does not returns result within the time bounds they require, i wanted to know from what source we can learn our algorithm writing skills so that they return the result in the acceptable execution time. or what can be the approaches for that?
Wikipedia (casual browsing is great so you can later recall that something is a solved problem, saving lots of effort that would have gone into reinventing algorithms for it) and Competitive Programming sites that do tutorials, TopCoder is pretty good. Bottom-up dynamic programming probably deserves additional practice, not because it's that hard (it isn't) but because it's so broadly applicable even to many problems that aren't well-known solved problems. It also unifies a lot of named algorithms that turn out to be nothing more than applications of DP. Works for me anyway. Some people read actual books, I've only read TAOCP 4A.
-
Wikipedia (casual browsing is great so you can later recall that something is a solved problem, saving lots of effort that would have gone into reinventing algorithms for it) and Competitive Programming sites that do tutorials, TopCoder is pretty good. Bottom-up dynamic programming probably deserves additional practice, not because it's that hard (it isn't) but because it's so broadly applicable even to many problems that aren't well-known solved problems. It also unifies a lot of named algorithms that turn out to be nothing more than applications of DP. Works for me anyway. Some people read actual books, I've only read TAOCP 4A.
Thanks for your valuable feedback, so your recommendation is to read the book and solve problems on topcoder, right?
-
I signed up recently on codility where programmers can learn writing algorithms and companies are use it to evaluate candidates for position, what i observed is that for normal inputs my solution always passes, but for very large input my code does not returns result within the time bounds they require, i wanted to know from what source we can learn our algorithm writing skills so that they return the result in the acceptable execution time. or what can be the approaches for that?
Hmmmm, They are probably looking to sell whatever you create on their website/service. Terms for companies - Codility[^]_
INTELLECTUAL PROPERTY RIGHTS
- We are the owner or licensee of all intellectual property rights (“IP Rights”) in the Service and in any material written or published on it. All such rights are reserved.
You must not use any content on the Site for any purpose not permitted by these Terms of Service and you must not copy, modify, re-format, frame, resell or abuse any part of the Service.
You agree to transfer to us all IP Rights in any content (including test cases and source code) you enter into the Service and you are responsible for any claims that arise due to the fact that you use the Service insofar as the claim relates to the Service (or any part of it) infringing any proprietary right (for example copyright). You are responsible for ensuring that you have the rights or permission needed to comply with these Terms of Service.
Any code entered into the Service by you may be stored and used by us in any way for the purpose of assessment, anti-cheating measures, demonstrating to third parties, and analysis.
_
- We are the owner or licensee of all intellectual property rights (“IP Rights”) in the Service and in any material written or published on it. All such rights are reserved.
-
I signed up recently on codility where programmers can learn writing algorithms and companies are use it to evaluate candidates for position, what i observed is that for normal inputs my solution always passes, but for very large input my code does not returns result within the time bounds they require, i wanted to know from what source we can learn our algorithm writing skills so that they return the result in the acceptable execution time. or what can be the approaches for that?
What you are talking about is explained quite well :
Essential Algorithms: A Practical Approach to Computer Algorithms[^]
Big O Notation Big O notation uses a function to describe how the algorithm's worst-case performance relates to the problem size as the size grows very large. (This is sometimes called the program's asymptotic performance.)
Rod Stephens, the author, shows example algorithms in relation to how they are affected by problem set size and explains how to talk about them using Big O notation. It's the clearest explanation I've seen of this. You can read more of the sample from the book at the amazon link.
-
Hmmmm, They are probably looking to sell whatever you create on their website/service. Terms for companies - Codility[^]_
INTELLECTUAL PROPERTY RIGHTS
- We are the owner or licensee of all intellectual property rights (“IP Rights”) in the Service and in any material written or published on it. All such rights are reserved.
You must not use any content on the Site for any purpose not permitted by these Terms of Service and you must not copy, modify, re-format, frame, resell or abuse any part of the Service.
You agree to transfer to us all IP Rights in any content (including test cases and source code) you enter into the Service and you are responsible for any claims that arise due to the fact that you use the Service insofar as the claim relates to the Service (or any part of it) infringing any proprietary right (for example copyright). You are responsible for ensuring that you have the rights or permission needed to comply with these Terms of Service.
Any code entered into the Service by you may be stored and used by us in any way for the purpose of assessment, anti-cheating measures, demonstrating to third parties, and analysis.
_
- We are the owner or licensee of all intellectual property rights (“IP Rights”) in the Service and in any material written or published on it. All such rights are reserved.