I recommend you to add additional test cases where only one key word, either operation or Orthos, appears in your input. Currently, the two words always appear simultaneously (unless they are both absent), and thus, one only needs to check the existence of a single word.
I also noticed that the iteration number qBig currently being used is too small (and your timing result is only in milliseconds, but there are other overheads which can cause very unreliable measurements). You should use larger qBig, at least 10000. Please note that Cody allows for at least 30 seconds for solution evaluations. So the evaluation time should be in the scale of seconds. This way, any solution runs too slow (e.g., in the scale of minutes) won't pass. This way, without modifying Cody's default scoring system, you automatically force people to focus on improving the code performance, rather than just reducing the code size. Also note that your current modification of the scoring function is an outdated hack to Cody's default scoring system, which does not work any more.
Hi, Peng Liu. Thanks for your feedback. TEST CASES: Even though both words always appear simultaneously, only checking for one would engender a high risk of failing Test 4. I do have planned one more decoding problem that would be like what you suggest, though. TIMING: Thanks for the extra information. Actually I'd cut down qBig — somehow I had the idea Cody only allowed a couple of seconds to run, at most. Based on your helpful advice I'll boost qBig. SCORING: Yes, I agree that it's an outdated hack. Hence I revised the wording of the introduction and commented out (almost) all of the size-related code in the Test Suite, compared to the Operation Phoenix problem.
Everything right but changing the class of the shift to uint8. :-(
Much appreciated that you've provided this example :-)
Swap the first and last columns
Make a run-length companion vector
Is this a valid Tic Tac Toe State?
Just take it easy for a second or two!
Is input the global variable z?
Make your own Test Suite (part 1)
Monte Carlo integration: area of a polygon
Testing for randomness: uniform distribution of integers
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office