A person was shading several unit squares in a square grid, to create a path from the bottom left corner to the top right corner. The path stepped from each square to the next either horizontally or vertically to create the path, but not diagonally.
For each row and column in that grid, the person wrote the number of shaded squares it contained on the edge of the grid. Here is an example:
Then, he drew another path but it but some parts were erased out. Here is the remainder of his path:
Your job is to find out the remainder of the path with an explanation.