Design Log Storage System
A medium-tier problem at 59% community acceptance, tagged with Hash Table, String, Design. Reported in interviews at Snap and 0 others.
Design Log Storage System is a medium-difficulty problem that Snap has asked in their interviews. The acceptance rate sits just under 60%, which means half the candidates who attempt it walk away stuck. This is a design problem, not a pure algorithm grind, which trips up people trained only on LeetCode. You need to think about how to store, index, and retrieve log entries efficiently. If you hit this on your live OA and don't have a solid storage schema in mind, you'll burn 20 minutes on false starts. StealthCoder surfaces a working solution in seconds if the pattern doesn't click.
Companies that ask "Design Log Storage System"
Design Log Storage System is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Made for the engineer who has done the work but might still blank with a webcam pointed at him.
Get StealthCoderThe trick here is that you're not just storing logs; you're querying them by timestamp range and user ID, which means naive approaches fail hard. Most candidates think 'just use a list' or 'hash everything', then realize they can't efficiently filter by time windows. The real pattern combines a Hash Table to group logs by user ID with an Ordered Set or sorted structure to retrieve logs within a timestamp range without iterating the entire dataset. The tricky part isn't the data structure individually, it's gluing them together so retrieval is sublinear. Common failure modes: forgetting to handle the inclusive/exclusive boundary on timestamps, not pre-sorting logs, or trying to query without indexing by time. When you're whiteboarding under pressure, the layered indexing logic gets messy fast. StealthCoder is your safety net on this one: if the design isn't gelling, you get a reference implementation that shows exactly how to wire the two structures together.
Pattern tags
You know the problem.
Make sure you actually pass it.
Design Log Storage System recycles across companies for a reason. It's medium-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Made for the engineer who has done the work but might still blank with a webcam pointed at him. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Design Log Storage System interview FAQ
Is this problem still asked at Snap?+
Snap has reportedly asked it. Design problems show up less frequently than raw algorithm questions, so if you see it, it usually means they're testing whether you can architect under pressure, not just code. Treat it seriously.
Why is the acceptance rate so low?+
At 59%, half the field struggles. Design problems have more moving parts than a standard algorithm. You need to think about storage, indexing, and query efficiency at once. Missing one layer usually means TLE or incorrect results on the range query.
What's the main trick I'm missing if I blank?+
Two-level indexing: hash by user ID first, then use an ordered structure (binary search tree, sorted list, or similar) by timestamp within each user's logs. Single-level indexing or linear scan kills you on range queries.
Do I need to code a custom Ordered Set?+
Depends on your language. Python's bisect module and Java's TreeMap handle it. C++ has ordered_set in policy-based data structures. Don't build from scratch in an interview unless explicitly asked. Use the language's stdlib.
How does this relate to Hash Table and Ordered Set topics?+
Hash Table indexes logs by user ID for O(1) lookup. Ordered Set (or equivalent) lets you retrieve all logs for a user within a timestamp range in O(log n + k) time, where k is result size. Both are essential.
Want the actual problem statement? View "Design Log Storage System" on LeetCode →