Stable marriage problem: Difference between revisions

Kotlin: with block idiom
(Kotlin: with block idiom)
Line 3,399:
"jan" to arrayOf("ed", "hal", "gav", "abe", "bob", "jon", "col", "ian", "fred", "dan")))
 
val matches = with(EngagementRegistry(guys, girls)) {
print(matchesthis)
matches. analyse(guys, girls)
matches. swap(girls, 0, 1)
matches. analyse(guys, girls)
}
}</lang>
{{out}}
Anonymous user