Ad
  • Custom User Avatar

    I finally managed to put together a solution that passes the full tests. I had to guess at a lot of unstated specifications. Here are the issues I had:

    • It wasn't clear that the entry column should have a valid DDMMYYYY/YYYYMMDD date. It seems as if any 8-digit string is acceptable.
    • Based on trial-and-error, I was able to figure out that you should discard rows that don't have 7 values. However, if a row has 7 values and there's no way to properly assign them to the schema, it is unclear whether you should throw out just that row or the entire input (my solution does the latter and passed the full tests).
    • It is unclear if a valid row will ever have more than 1 valid value assignment. For instance, for the input "B,1420,C,staff,no,20112020,4", both name and name_t could be either "B" or "C".