Problem 738. Criss_Cross_010 : Unique elements, Square array, Words in one array
Criss Cross matrix puzzle - Square matrix, Unique elements, Single Word List
Arrange the "words" into a solid square such that all words are used.
Given an array of words make the original Square or Square Transpose.
Words are left to Right or Top to Bottom. No fliplr or flipud.
Example:
M_orig = [1 2 3; 4 5 6; 7 8 9]
vr = [1 2 3; 4 5 6; 7 8 9]
vc = [1 2 3; 4 5 6; 7 8 9]
Inputs:
w = [1 2 3; 4 5 6; 7 8 9;1 4 7; 2 5 8; 3 6 9]
sorted w gives
w = [1 2 3; 1 4 7; 2 5 8; 3 6 9; 4 5 6; 7 8 9]
Output:
M_out = [1 2 3; 4 5 6; 7 8 9] or
M_out=[1 4 7; 2 5 8; 3 6 9]
Max size : 256
This is the second in the Criss Cross puzzles series.
Follow up puzzles will have non-unique values and quite a few other variations.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers8
Suggested Problems
-
Find the sum of all the numbers of the input vector
49116 Solvers
-
2584 Solvers
-
Check to see if a Sudoku Puzzle is Solved
321 Solvers
-
Assign numerical values to a structure with 1 field
31 Solvers
-
Replace multiples of 5 with NaN
440 Solvers
More from this Author308
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!