Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
Is there anything else needed for approval?
Yes. This is the fork to approve. I have just finished adding the suggestion you made with the not null assert, so it should be ready.
That does seem cleaner. I was unaware of this assert before, so thanks for pointing it out.
So if no one else has any comments/additions, will this be approved?
@nomennescio I swapped out slightly ugly syntax in favor of a typedef
typedef int (*SudokuBoard_t)[ 9 ]
.In addition, the relabeling now permutates 1-9, instead of only swapping 3 pairs of integers.
@hobovsky the translation now applies some random relabelling like so
The relabeling occurs before every transformation that was there before. So effectively the steps are:
Is this a sufficient relabeling/randomization strategy?
@nomennescio What would be the standard format? I'm willing to modify the code to comply with the standard.
@nomennescio I decided to convert to a contiguous 2D array. It was a fun little learning experience for me. Everything should be converted over now.
@hobovsky Thanks for the info on forking. Also, random test are implemented as a simple swapping of triples like you suggested.
@nomennescio If I were to convert back to a 2D array[9][9] (but keeping the allocation contiguous), would you prefer the use of a results parameter like hobovsky suggested?
#include <stdlib.h>
in tests.Random test aren't implemented yet. I will need to spend some time determining how to create them.
Oops. Looks like I get a little delete happy with the headers. I believe I have corrected that mistake now.
The assertion messages have been improved as suggested.
Let me know if any further changes are needed.