Design and implement a simple in-memory database (key-value store) that supports the following operations:
insert(key, value)
: Insert a key-value pair into the database. If the key already exists, update its value.
get(key)
: Return the value associated with the key, or indicate that the key does not exist.
delete(key)
: Remove the key and its associated value from the database if it exists.
Assume:
Requirements:
insert
,
get
, and
delete
.
Then, write code to implement these operations in the programming language of your choice.