You are looking down at a map of a 5x5 block area of a city where each block is occupied by one skyscraper. Call the heights 1, 2, 3, 4 and 5 (say they are in 10-story increments). Each row has one of each height and each column also has one of each height.
Considering that when viewed from outside the row or column, the nearer buildings of taller height hide those behind them that are of shorter height, numbers have been placed in the yellow areas pointing to a given row or column. Each number represents the number of buildings that can be seen from that vantage point when looking at the row or column in question.
Fill in each block's height.
From Mensa Puzzle Calendar 2019 by Fraser Simpson, Workman Publishing, New York. Puzzle for December 9.
(In reply to
Possible error in soln by FrankM)
FrankM,
Your are completely correct. I only considered two of the possible six "3-from-either-end" streets. Also, I "hard-wired" these two into my code rather than taking the time to find all six by logic or by brute force. So, I was very fortunate that one of these two was in the puzzle solution.
And also, I shall modify my code to include all six. I will use the code for Skyscrapers 3 (whenever that arrives) so I will not have to plod through the logic train ever. (From your spreadsheet, I was glad to see what I avoided!)
Thanks!
Steve