IBM interview question

Given 3 cases to write swapping program