Alloy interview question

Coding question to parse the data