Basic In-Memory Spreadsheet
Reported by candidates from Google's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.
The cell you never set is what trips people up on this one. Google reported this OA in October 2026: build the storage layer of a basic in-memory spreadsheet, then process a list of operations in order. The only example shown is SET A1 to 12, then GET A1 returns "12". It looks trivial, and that's the danger. You'll be tempted to rush it and miss what GET does on a cell that doesn't exist. If you blank on the details, StealthCoder runs invisibly during the live OA and gives you a working solution as a safety net.
The problem
Implement the basic storage layer of an in-memory spreadsheet. Process the operations in order: Examples Example 1 operations = [["SET","A1","12"],["GET","A1"]] return = ["12"] The lookup returns the value stored in A1.
Reported by candidates. Source: FastPrep
Pattern and pitfall
The core is a hash map from cell name to value. SET writes the key, GET reads it, and you append each GET result to the output list in order. That's the whole pattern. The trap is everything the statement doesn't spell out. The shown example has no unset cell, no overwrite, and no formula. Values come in as strings and the expected output is strings, so don't convert them to integers unless the problem text clearly says so. Check what the full statement wants for a missing cell, since the visible example doesn't say. Also keep SET from adding to the output, because only GET produces results. Finally, write the code so more operations can be added later, since this is called a basic storage layer. A small class with a dictionary and a dispatch on the operation name does that. If the live problem has extra operations you don't recognize, StealthCoder is the hedge that reads the full prompt and fills the gap.
Drill it cold or hedge it with StealthCoder. Either way, don't walk into the OA hoping you remember the trick.
You can drill Basic In-Memory Spreadsheet cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Made for the candidate who got the OA invite this morning and has 72 hours, not six months.
Get StealthCoderRelated leaked OAs
You've seen the question.
Make sure you actually pass Google's OA.
Google reuses patterns across OAs. Made for the candidate who got the OA invite this morning and has 72 hours, not six months. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Basic In-Memory Spreadsheet FAQ
How hard is the Google Basic In-Memory Spreadsheet OA really?+
The part shown is easy. It's a hash map with SET and GET. The difficulty comes from details the full statement may add, like missing cells or extra operations. Read the whole prompt carefully and don't assume the single example covers every case.
What's the trick to this problem?+
Use a dictionary keyed by the cell name. SET stores the value, GET looks it up and appends to the results. Keep values as strings, since the example returns "12" and not 12. Handle unset cells exactly as the statement describes.
What should GET return for a cell that was never set?+
The visible example doesn't say, so check the full problem text. Don't guess. If it's unspecified, ask or pick a sensible default like an empty string, and make the choice obvious in your code so it's easy to change.
Is this pattern still asked in OAs?+
Yes. Reported in October 2026 for Google, and in-memory storage or design-style problems with a stream of operations keep showing up. The shape is the same each time: parse an operation, update state, collect outputs.
How do I prepare in 48 hours?+
Write a small class with a dict and a method per operation. Practice processing a list of command arrays and returning only the GET results. Then think through edge cases like overwrites and missing keys, and how you'd add one more operation cleanly.