This puzzle is also called "Sparse Skyscrapers". This is very old puzzle created by me.
This Puzzle type appeared in the following championships
"18th World Puzzle Championship, Antalya (Turkey)"
Indian Puzzle Championship 2009
Fill the grid with digits 1 to (n-1) so that each digit appears exactly once in each row and in each column. Each digit inside the grid represents a building with the height of the digit itself. Numbers outside the grid indicate the number of buildings that can be seen by an observer looking into the grid in the corresponding direction, taking into account that higher buildings block the view of lower buildings from the observer. Exactly one cell will remain empty in each row and in each column.