Hashing for Grid

Hello,
I want to implement a hash function for 2d matrix. For example, given a large grid G with size NM and small grid g, nm where 1 <= m <= M & 1 <= n <= N, I need to find whether g exist in G. Can you guys give me any suggestion? Thank You

Comments (1)