REPOSITORY CODING · MEDIUM
Requeue displaced residents who still have choices, preserving one proposal per resident-school pair
Requeue displaced residents who still have choices, preserving one proposal per resident-school pair. Trace the native model, algorithm services, repository snapshot and HTTP preview. Repair the incident while preserving the other contracts. All explicit fixtures and mandatory regression groups are available with bash test/run.sh.
stable-matchingCapacitated stable matching laboratory
Work through a real codebase.
Choose an environment, investigate the existing implementation and use the tests to check your change. Sign in to open a workspace; execution and Ono usage follow your plan’s allowances.
Task requirements and environments
Ruby on Rails · 55 minute session
- Hold residents up to and including each school capacity. A school with one slot may hold one resident.
- A proposal is acceptable only when the school ranks that resident; proposer preference alone is insufficient.
- Requeue displaced residents who still have choices, preserving one proposal per resident-school pair.
- Break school priority ties by resident ID and flatten resident preference tiers by school ID, producing deterministic weakly stable matches.
- Validate duplicate preference entries and use strict rank improvement, not indifference, when reporting weak blocking pairs.
- At most ten residents and ten schools. Preference tiers encode indifference; lexicographic refinement defines the algorithm while blocking-pair reports use the original strict tier relation. Unranked pairs are unacceptable. No real admission decision is made.