Back to problems

Keep Stable Unique Column Names Across Schema Changes

Algorithm · Microsoft · Hard

Implement a function that processes a sequence of schema snapshots for multiple tables. Each snapshot is given as an array where the first element is a case‑sensitive table name and the remaining elements are the current ordered column names. The function must return, for every snapshot, an array of “mapped names” that replaces each original column name according to the rules below. For each table, maintain a persistent mapping from the original column name (exact case) to…

Checking your access…