← LinkedIn Interview Insights

LinkedIn·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Apr 2026

Summary

LinkedIn system design round for a software engineering role. The whole session was focused on building an in-memory key-value store from scratch, which sounds straightforward until you're actually in it and realize how many corners you have to defend.

Questions Asked (1)

Q1

Design a low-level in-memory key-value store backed only by a hash map. Define the API, specify edge case behavior, handle concurrency, and discuss the inherent limitations of this approach.

System DesignTechnical Trade-offsAlgorithms & Data Structures
Author's notes

I started with get/put/delete and felt pretty good about it, then they pushed on contains and size and I realized I hadn't thought through atomicity at all.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining a minimal, thread-safe API (get, put, delete) with clear semantics for missing keys and null values. Then discuss concurrency strategies like fine-grained locking or ConcurrentHashMap, and finish by acknowledging limitations such as no persistence, no eviction, and memory constraints.

Pro tip: Proactively mention that a hash map alone cannot support range queries or ordered iteration, and suggest how you'd extend it (e.g., with a skip list) if needed—this shows you understand trade-offs beyond the immediate ask.

1. Define the API and semantics

Specify methods like get(key), put(key, value), delete(key), and containsKey(key). Clarify behavior for null keys/values, missing keys, and whether operations are atomic.

2. Address edge cases

Discuss handling of null keys (e.g., disallow or use a sentinel), null values (e.g., treat as delete or store), and concurrent modifications during iteration.

3. Design for concurrency

Choose a concurrency strategy: synchronized methods, read-write locks, or ConcurrentHashMap with atomic operations. Explain trade-offs in throughput and complexity.

4. Discuss limitations

Highlight that a hash map alone lacks persistence, eviction policies, range queries, and scalability beyond a single node. Mention memory overhead and hash collisions.

5. Propose extensions (optional)

If time permits, suggest how to add TTL, LRU eviction, or persistence, and note the additional data structures or systems required.

Key Points to Mention

  • Thread safety: use ConcurrentHashMap or explicit locking; avoid check-then-act races.
  • Null handling: decide whether to allow null keys/values and document it.
  • Atomicity: ensure compound operations (e.g., putIfAbsent) are atomic.
  • Limitations: no persistence, no eviction, no range queries, single-node only.
  • Memory: hash map overhead and potential for unbounded growth.
  • Performance: O(1) average time, but worst-case O(n) with collisions.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.