One common type of follow-up question that is asked during interviews is extending the question in a distributed way. For example, one example could be "how would you solve the problem if the inputs do not fit into memory?".
- A more concrete example could be seen in question 4 of this thread: https://discuss.leetcode.com/topic/80691/google-onsite-interview-questions/2
Given a 2D matrix M X N, support two operations: Query(row1, col1, row2, col2) such that I get the sum of all numbers in the rectangle ((row1, col1), (row1, col2), (row2, col1), (row2, col2)) and Update(row, col) to a new number And query is a very frequent operation and update is a rare operation, so query should be really fast, but update can be slower. Follow up: How would you solve this in a distributed fashion
How can one prepare for these types of questions? What are some good resources that can help prepare for these questions?