Amazon Interview Question

Simple debugging of C++/Java functions. Easy if one knows the syntax of either language. Too pressed for time to properly debug. Easy pattern recognition logic puzzles.