1.In this question, we represent the board using a 2D array. In principle, the board is infinite, which would cause problems when the active area encroaches the border of the array. How would you address these problems?
2.What If the matrix is too big that it cannot store completely in RAM?
I know One way is to read and process line by line. can you provide implementation details?
3.How do you solve this problem using multithreads?