-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
A direct copy of the algorithm found in https://github.com/davecom/ClassicComputerScienceProblemsInSwift/blob/master/Classic%20Computer%20Science%20Problems%20in%20Swift.playground/Pages/Chapter%203.xcplaygroundpage/Contents.swift can give results that violate the same row constraint (if the format is "column: row"). For example:
"[2: 3, 5: 4, 7: 5, 4: 6, 8: 8, 1: 1, 3: 8, 6: 2]"
8:8 and 3:8 are in the same row, which is a violation. Another example:
"[5: 2, 7: 6, 8: 1, 1: 1, 4: 7, 2: 3, 6: 4, 3: 5]"
8:1 and 1:1 are violating the same row constraint
Metadata
Metadata
Assignees
Labels
No labels