Amazon Interview Question

Linux, programming, scenario and puzzle