Pregunta de entrevista de HashiCorp

Round: Machine Coding / Code Pair Question: "Simple Database" (In-Memory Key/Value Store) Details: I was given a skeleton Python class and asked to implement a database library that supports basic SET/GET/UNSET operations. The twist: I had to implement Nested Transactions. BEGIN starts a transaction (can be called multiple times to nest). ROLLBACK reverts only the latest transaction. COMMIT finalizes everything.