< Back

Post Lab 31

Post labs are to be done individually. Sharing files between students is not allowed. Doing so is an Academic Integrity violation, and will be treated as such.


We have covered a majority of the topics needed to be covered in CPSC120. However, we haven't had a chance to emphasize is problem solving skills. So we are going to give you some logic problems to solve for the rest of the semester.

Details

A skyscraper puzzle is similar to a sudoku puzzle. You are given a 4 x 4 grid to fill in with numbers in the range 1 - 4. Each row and column must contain all of these values. These numbers represent the height of the skyscrapers. The numbers around the border specify the number of skyscrapers visible on that row and column. Use this information to determine where the skyscrapers are present in the grid.

For example, if from the direction of the street you see a 4 story skyscraper, you would only see 1 building since that one blocks the rest. However, if you would see 4 buildings, the heights would have to be in ascending order.

2 2 1
3 1
1 3
3 2
2 3
1 2 3

Submission

Turn this paper in at the beginning of the next class.

Post labs are to be done individually. Sharing files between students is not allowed. Doing so is an Academic Integrity violation, and will be treated as such.