Discord Software Engineer Phone Screen Questions
3+ questions from real Discord Software Engineer Phone Screen rounds, reported by candidates who interviewed there.
What does the Discord Phone Screen round test?
The Discord phone screen typically lasts 45-60 minutes and evaluates core Software Engineer fundamentals. Candidates should expect 1-2 algorithmic problems, basic system design discussion at senior levels, and questions about relevant experience. The goal is to confirm technical competence before bringing candidates onsite.
Top Topics in This Round
Discord Software Engineer Phone Screen Questions
## Problem Implement a content moderation function that detects bad words in user-submitted text. Matching must handle: 1. Exact match (case-insensitive). 2. Leet-speak substitutions: `3->e`, `@->a`, `0->o`, `1->i`. 3. Repeated characters: `haaaate` matches `hate`. Return the sanitized string with each bad word replaced by `***`. ```python def censor(text: str, blocklist: list[str]) -> str: pass ``` **Example:** ``` blocklist = ["hate", "spam"] text = "I h@t3 sp@@m and haaaate it!" output -> "I *** *** and *** it!" ``` ## Follow-ups 1. Leet-speak normalization should happen before deduplication or after? Why does the order matter? 2. How would you build a Trie over the normalized blocklist for fast multi-pattern matching (Aho-Corasick)? 3. False positives: `"assassination"` contains `"ass"`. How do you reduce them without a huge allowlist? 4. The system processes 100,000 messages per second. What architecture would you use for real-time filtering?
Chat Server: Design a Real-Time Messaging System with Rooms, Message History, and User Presence
## Problem Design a `ChatServer` class that manages chat rooms: - `create_room(room_id)` -- create a new room. - `join_room(user_id, room_id)` -- add user to room. - `leave_room(user_id, room_id)` -- remove user from room. - `send_message(user_id, room_id, text) -> Message` -- broadcast message; return message object with timestamp. - `get_history(room_id, limit=50) -> list[Message]` -- return the `limit` most recent messages. - `online_users(room_id) -> list[str]` -- return currently joined users. ```python from dataclasses import dataclass from datetime import datetime @dataclass class Message: id: int user_id: str room_id: str text: str timestamp: datetime class ChatServer: ... ``` **Example:** ``` server.create_room("general") server.join_room("alice", "general") server.send_message("alice", "general", "hello") server.get_history("general") -> [Message(...)] ``` ## Follow-ups 1. `get_history` must be fast even with millions of messages. What storage structure and index would you use? 2. A user disconnects without calling `leave_room`. How do you detect and clean up stale presence? 3. How would you fan out a message to 10,000 users in the same room with low latency? 4. Add read receipts: track which users have seen each message up to which message id.
## Problem Parse and organize log events by timestamp or category, possibly merging overlapping or deduplicating events. ## Likely LeetCode equivalent No direct match with high confidence. ## Tags sorting, arrays, hash_table
See All 3 Questions from This Round
Full question text, answer context, and frequency data for subscribers.
Get Access