Skip to content

Instantly share code, notes, and snippets.

/**
* get3rdPlaceAssignments
*
* Given the 8 groups whose 3rd-place teams qualified, returns a mapping of
* which 3rd-place team faces each group winner in the Round of 32.
*
* @param qualifiedGroups - Array of 8 group letters, e.g. ["A","B","C","D","E","F","G","H"]
* @returns Record<string, string> mapping slot → 3rd-place team identifier
* e.g. { "1A": "3E", "1B": "3J", "1D": "3I", ... }
* Returns null if the combination is not found in the table.