PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/System Design/Meta

Design core bank operations

Last updated: Mar 29, 2026

Quick Overview

This question evaluates system design competency with emphasis on data modeling, API and identifier semantics, validation rules, return-value conventions, transaction recording, and complexity analysis for an in-memory banking service.

  • medium
  • Meta
  • System Design
  • Software Engineer

Design core bank operations

Company: Meta

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Take-home Project

Design a BankSystem class that supports: createAccount(timestamp, customerId) -> bool, deposit(timestamp, customerId, amount) -> int, and pay(timestamp, sourceAccountId, targetAccountId, amount) -> int. Define data models, validation rules (duplicate/nonexistent accounts, nonpositive amounts, insufficient funds), id semantics, and return values. Describe how balances and transaction records are updated, what data structures you use (e.g., hash maps keyed by accountId), and the time/space complexity of each operation.

Quick Answer: This question evaluates system design competency with emphasis on data modeling, API and identifier semantics, validation rules, return-value conventions, transaction recording, and complexity analysis for an in-memory banking service.

Related Interview Questions

  • Design Top-K, Crawler, and Chess Systems - Meta (hard)
  • Design Search And Web Crawling Systems - Meta (medium)
  • Design an Instagram-Style Social Feed - Meta (medium)
  • Design an Online Game Leaderboard - Meta (hard)
  • Design an On-Demand Delivery Platform - Meta (medium)
Meta logo
Meta
Aug 9, 2025, 12:00 AM
Software Engineer
Take-home Project
System Design
1
0

Design a BankSystem Class (Take‑home Project)

Goal

Design and document a BankSystem class that supports three operations:

  • createAccount(timestamp, customerId) -> bool
  • deposit(timestamp, customerId, amount) -> int
  • pay(timestamp, sourceAccountId, targetAccountId, amount) -> int

Assume this is an in-memory service intended for correctness and clarity (not persistence or distributed systems).

What to Produce

Provide a complete specification and design that covers:

  1. Data Models
  • Define the core entities (e.g., Account, Transaction) and their fields.
  • Specify how balances and transaction records are stored and updated.
  1. Identifier Semantics
  • Clarify what customerId and accountId represent and how they relate (e.g., 1:1 vs. 1:many).
  • Reconcile that deposit takes customerId while pay uses accountIds.
  1. Validation Rules
  • Duplicate vs. nonexistent accounts.
  • Nonpositive amounts (zero or negative).
  • Insufficient funds for payments.
  • Any other constraints you deem important (e.g., overflow, same source/target).
  1. Return Values
  • Define exactly what the bool and int returns mean in all cases (success and error).
  • If using error codes, enumerate them.
  1. Data Structures
  • Describe the primary data structures (e.g., hash maps keyed by accountId) used to implement O(1) operations.
  1. Operational Semantics
  • For each API, describe step-by-step how state changes and transaction records are appended.
  • Include how timestamps are used in records.
  1. Complexity
  • Time and space complexity for each operation and overall storage.
  1. Assumptions
  • State any reasonable assumptions you make (e.g., single-threaded, amounts in cents, integer timestamps).

You may include concise pseudocode to illustrate the implementation.

Solution

Show

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Meta•More Software Engineer•Meta Software Engineer•Meta System Design•Software Engineer System Design
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.