Changes between Version 10 and Version 11 of ProgrammingPrompts
- Timestamp:
- Nov 24, 2015, 11:45:25 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ProgrammingPrompts
v10 v11 14 14 15 15 === Checkerboard 16 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).[[BR]][[Image(https://upload.wikimedia.org/wikipedia/commons/thumb/7/70/Checkerboard_pattern.svg/300px-Checkerboard_pattern.svg.png)]] 16 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).[[BR]] 17 {{{ 18 #!div align="center" 19 [[Image(https://upload.wikimedia.org/wikipedia/commons/thumb/7/70/Checkerboard_pattern.svg/300px-Checkerboard_pattern.svg.png)]] 20 }}} 17 21 18 22 === Sort3 … … 40 44 Given a chess board (8-by-8) populated entirely by queens, determine if any of the queens are threatened by another. Write a static function to determine this, given a 2D boolean array where queens are represented by {{{true}}}. 41 45 42 ''Remember, queens threaten other chess pieces when they lie on the same row, column, or diagonal.'' 46 ''Remember, queens threaten other chess pieces when they lie on the same row, column, or diagonal.'' Your static method should return true if any queens are threatened by another and false otherwise. 43 47 44 48 === !CodeBreaker … … 46 50 47 51 == Test Scripts 52 Test scripts are designed to help you debug your code, not for any grade/point value (what are grades?), so they are not secure. 53 48 54 You can download the ''Eclipse'' projects individually for each prompt, or download them all in a single zipped file (separate projects).