Sapiens interview question

Basic Java,1 problem on programming, 1 problem apptitude