MATLAB Spoken Here

Tapping the Community to Get Real Work Done 3

Posted by Michael Katz,

A few weeks ago I was approached by a reader, Mark, asking for algorithm advice. He had a simple, well-bounded, easily-verifiable problem: sort an array based on a certain combination of the values’ digits. This question was both interesting and easy enough for me, which made me think that this would be an excellent problem for Cody.

Using Cody to solve a problem like this has numerous advantages. First off, you’ll get an answer quicker and more complete than you would by asking me to help you out. Second, it will only cost your time. Third, it helps out the Cody community by keeping the pipeline full of interesting challenges.

Creating a new problem is simple and fun:

  1. From Cody, press the big blue “Create a Problem” button.
  2. Fill out the problem title and description. If you can formulate the problem clearly in a few sentences, it’s a big indicator you’ll get your problem solved.
  3. Finally, you need to create a test suite to make sure the problem gets solved. The more robust the test suite, the better the solutions will be. Be sure to cover cases like empty value, repeat values, out of bounds values, etc.
  4. You can create an optional reference solution. Reference solutions are good if you’re providing a brain teaser that you’ve already solved. But if this is a problem you don’t know yet how to solve, feel free to leave it out.
  5. Publish it.
  6. Profit!

Try out the problem I created for Mark and try to beat my answer!

Just remember that Cody rates problems based on an approximation of code size, which may not be the best code for maintainable, reusable project.

3 CommentsOldest to Newest

So, all the solutions are locked. In order to view any of the solutions, one would need to provide a solution of the same size or smaller. If you didn’t know how to work the problem in the first place, how are you going to beat everyone else and provide the most optimum (smallest) code in order to view all the other solutions?

@Craig, Provide a solution to another problem or two and it will unlock all of the solutions for that one.

A novice to mathworks having difficulties importing monthly data with dates. what I need is a consultant, outside or inside mathworks to complete the project for me for a fair fee. I have my data already. Need help with importation.
Need mathworks expert for a fee. I believe it will be a piece of cake for someone who knows mathworks
Thanks
Joseph

These postings are the author's and don't necessarily represent the opinions of MathWorks.