With the size fixed at 3x4, this should be solvable as a pruned brute force search. Just go cell by cell, iterating over all possible letters that can go there. A letter is not allowed if it appeared in that row or column of the original, or if you have already placed it in another cell. For each value that can go in one cell, iterate over values for the next cell, etc.
To deal with the row/column constraints, when you will a row or column, compare it against all constraints of that type. For each constraint it should contain all letters or none of the letters; if it contains only some of the letters reject that case and move on to the next possible placement. When you fill the last cell, save that solution. If there is already a saved solution, then the solution is not unique and you can reject it. On Tue, Oct 16, 2012 at 10:35 AM, Vaibhav Jain <[email protected]>wrote: > Hi all, > Please help me out with this problem. > I want to know how to approach or solve this problem. > I don`t want code, just how to solve it out. > If you can provide any important material link similar to this problem, > that would be the best. > > -- > You received this message because you are subscribed to the Google Groups > "Google Code Jam" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-code/-/Dq7Tl_HiuU4J. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
