← Meta Interview Insights

Meta·Software Engineer·Online Assessment (OA)·Senior

SeniorPrefer not to say
Apr 2026Remote

Summary

Meta coding interview, the classic CodeSignal-style multi-level banking system design question. Four progressively harder stages and you have to get through all of them under time pressure. Not the most creative problem I've seen but the complexity ramps up fast.

Questions Asked (4)

Q1

Design a banking system that supports account creation, deposits, withdrawals, and balance lookups, all processed in timestamp order.

Algorithms & Data StructuresSystem Design
Author's notes

The first level is straightforward.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then design a data model that supports efficient timestamp-ordered operations. Use an ordered data structure like a balanced BST or skip list to maintain transactions, and ensure each operation is processed in timestamp order. Finally, discuss trade-offs and potential optimizations for scale.

Pro tip: Demonstrate awareness of real-world banking constraints like idempotency and exactly-once processing, and mention how you would handle out-of-order timestamps or late-arriving transactions.

1. Clarify Requirements

Ask about expected scale, consistency requirements, and whether timestamps are provided by clients or generated server-side. Confirm if operations must be strictly ordered or if eventual consistency is acceptable.

2. Design Data Model

Define Account and Transaction entities. Use a map for accounts and an ordered structure (e.g., balanced BST, skip list, or sorted list) to store transactions by timestamp for each account or globally.

3. Implement Operations

For each operation, validate inputs, check account existence, and apply the transaction in timestamp order. Use locking or optimistic concurrency to handle concurrent access.

4. Handle Ordering and Concurrency

Explain how to process out-of-order timestamps (e.g., buffer and sort) and ensure thread safety. Discuss using a priority queue or log-structured storage for high throughput.

5. Discuss Scalability and Trade-offs

Talk about partitioning by account ID, using distributed logs (e.g., Kafka), and trade-offs between consistency and availability. Mention potential bottlenecks and mitigation strategies.

Key Points to Mention

  • Choice of data structure for timestamp ordering (e.g., balanced BST, skip list, or sorted array with binary search)
  • Concurrency control mechanisms (locks, optimistic concurrency, or serializable transactions)
  • Idempotency and exactly-once processing to handle duplicate requests
  • Handling out-of-order or late-arriving transactions
  • Scalability considerations: sharding by account, distributed transaction logs, and eventual consistency
  • Time complexity analysis for each operation (e.g., O(log n) for insertion and lookup)

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

Q2

Extend the banking system to support a TOP_SPENDERS query that returns accounts ranked by their total outgoing transaction amount.

Algorithms & Data StructuresData Modeling
Author's notes

Sorting by outgoing spend sounds simple but you need to track cumulative withdrawals and transfers separately per account as you go.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Clarify the query semantics (time window, outgoing definition, ranking ties) and then design a solution that balances query performance with write overhead. Propose a data model and algorithm, such as maintaining a running total per account or using a batch aggregation, and discuss trade-offs.

Pro tip: Mention that you would first check if the system already has a ledger or transaction log that can be leveraged, and consider whether the query needs to be real-time or can be served from a periodically updated materialized view.

1. Clarify requirements

Ask about the definition of 'outgoing' (e.g., debits, transfers, withdrawals), the time window (all-time, monthly), and whether ties should be broken by account ID or another criterion.

2. Choose data model

Decide whether to compute totals on the fly from transactions or maintain a pre-aggregated balance per account. Consider adding a 'total_outgoing' field to the account record or a separate summary table.

3. Design algorithm

If pre-aggregating, update the total on each outgoing transaction. For querying, sort accounts by total descending. If computing on the fly, aggregate transactions per account and then sort.

4. Optimize for scale

Discuss indexing (e.g., on total_outgoing), caching, or using a heap for top-K if only top N are needed. Consider sharding or distributed aggregation if data is large.

5. Handle edge cases and consistency

Address concurrency (e.g., locking or atomic updates), negative amounts, and how to handle updates or reversals. Ensure the query reflects a consistent snapshot.

Key Points to Mention

  • Definition of outgoing transactions and time window
  • Trade-off between real-time computation and pre-aggregation
  • Indexing and query optimization for ranking
  • Handling ties in ranking (e.g., by account ID)
  • Concurrency and consistency during updates
  • Scalability considerations (sharding, caching, top-K algorithms)

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

Q3

Add TRANSFER (immediate) and SCHEDULE_TRANSFER (executed at a future timestamp) operations, plus the ability to cancel a pending scheduled transfer.

System DesignAlgorithms & Data StructuresTechnical Trade-offs
Author's notes

This is where things got messy for me.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then design a data model and API for immediate and scheduled transfers with cancellation. Discuss trade-offs between in-memory scheduling and persistent job queues, and outline how to ensure correctness and idempotency.

Pro tip: Emphasize idempotency and failure recovery—interviewers at Meta care deeply about systems that handle retries and partial failures gracefully, so mention how you'd prevent duplicate transfers if a scheduled job runs twice.

1. Clarify Requirements and Constraints

Ask about expected scale, latency requirements, persistence needs, and whether transfers must be atomic across accounts. Confirm if cancellation is only for pending scheduled transfers and how far in advance scheduling is allowed.

2. Design Data Model and API

Define core entities: Transfer (immediate), ScheduledTransfer (with status: PENDING, EXECUTED, CANCELLED), and a unique transfer ID. Specify API endpoints: POST /transfer, POST /schedule_transfer, DELETE /schedule_transfer/{id}.

3. Choose Scheduling Mechanism and Storage

Decide between in-memory timers (e.g., priority queue) and persistent job queue (e.g., database-backed scheduler). Discuss trade-offs: in-memory is fast but not durable; persistent is reliable but adds latency and complexity.

4. Address Correctness, Idempotency, and Cancellation

Ensure transfers are idempotent using unique keys and transactional updates. For cancellation, mark the scheduled transfer as CANCELLED and ensure the executor checks status before processing. Handle race conditions between cancellation and execution.

5. Discuss Scalability and Failure Recovery

Explain how to scale the scheduler (e.g., sharding by user ID) and recover from failures (e.g., re-queue missed jobs, use dead-letter queues). Mention monitoring and alerting for failed transfers.

Key Points to Mention

  • Idempotency keys to prevent duplicate transfers on retries
  • Transactional consistency for debiting and crediting accounts
  • Trade-offs between in-memory scheduling (low latency, non-durable) and persistent job queues (durable, higher latency)
  • Race condition handling between cancellation and execution (e.g., optimistic locking or status checks)
  • Scalability considerations: sharding, partitioning, and load balancing for scheduled jobs
  • Failure recovery: retries with exponential backoff, dead-letter queues, and monitoring

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

Q4

Implement MERGE_ACCOUNTS that consolidates one account into another, carrying over the full transaction history and any pending scheduled transfers.

System DesignData ModelingTechnical Trade-offs
Author's notes

Hardest part of the whole problem.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then design a data model that supports account merging with full transaction history and pending transfers. Discuss the merge process step by step, covering data migration, consistency, and handling edge cases like duplicate transactions or conflicting scheduled transfers.

Pro tip: Emphasize idempotency and atomicity: the merge should be safe to retry and either fully complete or roll back, which is critical in distributed systems like Meta's.

1. Clarify Requirements

Ask about scale, consistency requirements, and whether the merge is one-time or reversible. Confirm what 'full transaction history' and 'pending scheduled transfers' entail.

2. Design Data Model

Propose a schema that links transactions and scheduled transfers to accounts, ensuring historical data remains intact after merge. Consider using a merge log or tombstone for the source account.

3. Outline Merge Process

Describe steps: validate accounts, lock them, reassign transactions and scheduled transfers, update balances, and mark source account as merged. Ensure atomicity via transactions or sagas.

4. Handle Edge Cases

Address duplicate transactions, conflicting scheduled transfers, currency mismatches, and partial failures. Discuss idempotency and retry logic.

5. Discuss Trade-offs

Compare approaches: immediate vs. lazy migration, synchronous vs. asynchronous processing, and impact on read/write performance. Justify choices based on requirements.

Key Points to Mention

  • Idempotency and atomicity of the merge operation
  • Data consistency and isolation levels during migration
  • Handling of pending scheduled transfers (e.g., cancel, reschedule, or reassign)
  • Audit trail and reversibility (merge log, soft delete)
  • Scalability considerations for large transaction volumes
  • Impact on downstream services and caching

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