Stable marriage problem: Difference between revisions

Content added Content deleted
(→‎{{header|Groovy}}: new solution)
Line 856: Line 856:


=={{header|Groovy}}==
=={{header|Groovy}}==
{{trans|Java}} (more or less) Uses explicit maps for preference ranking rather than list position. Uses Man and Woman enumerated types instead of string names, in order to use compile time type and constant checking to help keep the playas straight without a scorecard.
{{trans|Java}} (more or less) Uses explicit maps for preference ranking rather than list position. Uses Man and Woman enumerated types instead of string names, in order to take advantage of compile time type and constant checking to help keep the playas straight without a scorecard.


"Stable Matching" Solution:
"Stable Matching" Solution: