IBM Interview Question

An algorithm coding problem