Revolent interview question

Very generalized programming Q for a technical interview