Skyscrapers Sudoku #40
Write numbers from 1 to N into the cells of the grid of size NxN. Each number must appear exactly once in each row, column, and block.
Additional rules: A number at the edge of the grid indicates how many numbers are higher than all previous numbers if you "look into" the grid at the given position.