Cody: what are the criteria for being able to view all solutions?
Christian Schröder
on 8 Jan 2023
When solving problems over on Cody, I can almost always view all solutions to a problem after submitting a correct solution of my own. Very rarely, however, this is not the case, and I instead get the following message:
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
You may solve another problem from Community group to unlock all the solutions to this problem.
If this happens, then again, I can almost always rectify this by submitting a (correct) solution to a different problem (I take it that the Community group is the implicit group of all problems on Cody --- is it?). But sometimes that, too, fails.
So my question is, why? What are the criteria that determine when all solutions are, in fact, unlocked?
9 Comments
Updating this thread with some relevant info.
The criteria to view all solutions to a problem in Cody has been updated - now, you have to solve the problem once, and that is all that's needed to view all solutions to that problem.
Here's the official announcement post: https://www.mathworks.com/matlabcentral/discussions/highlights/775960-new-in-cody-view-all-solutions-after-solving-a-problem?s_tid=mlc_disc_email_activity
Hi Christian, thanks for taking the time to post this question.
Unlocking Solutions
Cody calculates a size for each solution. When you submit a correct solution to a problem, you can see other solutions of the same size (that is, the same length or longer), but not shorter solutions.
Each time you solve a new problem, you unlock all solutions to your previously solved problems in the same group.
You're right in your observation that the 'Community Group' is the implicit group that any problem belongs to, if it hasn't been added to any other groups. So I believe that the behavior you are observing might be that, whenever you solve another ungrouped problem, it is unlocking solutions to other ungrouped problems belonging to Community Group.
I agree this current way could be improved to be more straight-forward and transparent. We are planning to bring some changes into the rules of locking/unlocking solutions for players across Cody, and those changes will definitely be more transparent and streamlined than right now.