Cirrus Logic interview question

A coding question related to string manipulation.