RTX interview question

A few programming code to debug.