Snake Rules

Rules: Locate a snake in the grid, whose head and tail are given.The snake must only move parallel to the grid lines, and go through centers of grid cells. The snake does not visit squares which touch those it has already visited, either adjacently or diagonally. Numbers outside the grid indicate the number of cells in that row/column that the snake goes through. See the example below: