An $N \times N$ table is filled with integers such that numbers in cells that share a side differ by at most 1. Prove that there is some number that appears in the table at least N times.
An example:

In the example the numbers 1 and 2 both appear at least 5 times.
I think this has something to do with the pigeon-hole principle. If you set one of the center most cells to 0.
In odd $N$ cases, the integers in all the other cells can vary between $[-n+1,+n-1]$.
In even $N$ cases, the integers in all the other cells can vary between $[-n,n]$.
In either case you can only show that some number appears at least $n/2$ times. It might also be induction, but I don't really know how to apply induction to this problem.
This question was also asked on Puzzling Stack Exchange: link. This answer is paraphrased from the top answer there.