Adding the challenge 0103

This commit is contained in:
2026-07-21 21:36:14 +02:00
parent 6888f8fd5b
commit 9b32b8b8f2
4 changed files with 185 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
package db0103
type KV struct {
log Log
mem map[string][]byte
}
func (kv *KV) Open() error
func (kv *KV) Close() error { return kv.log.Close() }
func (kv *KV) Get(key []byte) (val []byte, ok bool, err error) {
val, ok = kv.mem[string(key)]
return
}
func (kv *KV) Set(key []byte, val []byte) (updated bool, err error)
func (kv *KV) Del(key []byte) (deleted bool, err error)
// QzBQWVJJOUhU https://trialofcode.org/