wiki:ProgrammingPrompts

Version 7 (modified by Timothy Lin, 9 years ago) (diff)

--

Programming Prompts

Feel to add good prompts into this list as you find them. This will greatly help future software team leads and new members.

The prompts are written with Java in mind, but can be adapted to most languages. The downloadable test scripts are run with Java, require the main class name to be the name of the prompt.

Checkerboard
Write a static method that takes two int parameters m and n and returns a checkerboard-patterned two-dimensional boolean array that is m-by-n in size. Any given checkerboard square on a checkerboard has no adjacent squares with the same color (boolean value).
https://upload.wikimedia.org/wikipedia/commons/thumb/7/70/Checkerboard_pattern.svg/300px-Checkerboard_pattern.svg.png

Test Scripts

Attachments (5)

Download all attachments as: .zip