| # | Problem | Concept |
|---|---|---|
| #295 | Find Median from Data Stream | Streaming aggregation |
| #703 | Kth Largest Element in a Stream | Heap-based streaming |
| #380 | Insert Delete GetRandom O(1) | Hash + array combo |
| #381 | Insert Delete GetRandom O(1) - Duplicates | Multi-set design |
| #432 | All O'one Data Structure | Complex state tracking |
| #716 | Max Stack | Stack with auxiliary structure |
| #895 | Maximum Frequency Stack | Frequency + recency |
Build a full KV store in Go that ties together all concepts:
type MVCCStore interface {
// Transactional operations
Begin() Transaction
// Direct operations (auto-commit)
Get(key string) (string, error)
Set(key string, value string) error
Delete(key string) error
// Snapshot for consistent reads
Snapshot() Snapshot
}
type Transaction interface {
Get(key string) (string, error)
Set(key string, value string)
Delete(key string)
Commit() error
Rollback()
}
Stretch goals: