PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Software Engineering Fundamentals/Airtable

Optimize a dispatcher’s scheduling data structures

Last updated: May 4, 2026

Quick Overview

This question evaluates understanding of algorithmic analysis and data-structure design for memory-constrained scheduling, including efficient lookup and update operations for tables and machines and the selection of placement and migration policies, categorized under Software Engineering Fundamentals.

  • easy
  • Airtable
  • Software Engineering Fundamentals
  • Software Engineer

Optimize a dispatcher’s scheduling data structures

Company: Airtable

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: easy

Interview Round: Onsite

## Algorithmic analysis / code review: Dispatcher for memory-constrained scheduling You are given a single-threaded in-memory **dispatcher** that reacts to two kinds of API calls: ### Downstream (storage/table) requests - `CreateTable(tableId, memoryRequired)` - `ResizeTable(tableId, newMemoryRequired)` ### Upstream (mini-orchestrator) capabilities - `CreateWorkload(machineId, tableId)` (place a table/workload on a machine) - `MoveWorkload(tableId, fromMachineId, toMachineId)` ### Problem The dispatcher must maintain the state of: - A set of **machines** with fixed memory capacities. - A set of **tables/workloads** each requiring some amount of memory. - A mapping of which table is placed on which machine. When a table is created or resized, the dispatcher should: 1. Check whether the current machine (if already placed) still has enough free memory. 2. If not, choose a destination machine and **move** the workload. 3. If the table is new, choose a machine and **place** it. You are handed a correct but inefficient implementation. ### Tasks 1. Analyze the **time complexity** of the naive approach (typical pitfalls: scanning all machines, repeated recomputation of free memory). 2. Propose improved **data structures** to support fast: - lookup by `tableId` and `machineId` - choosing a machine with enough free memory - updating free memory after moves/resizes 3. Propose a reasonable **scheduling policy** (e.g., first-fit/best-fit) and discuss tradeoffs. ### Constraints / clarifications - No external database. - No multithreading/concurrency concerns. - Focus on algorithmic efficiency, correctness, and maintainability. - Consider edge cases (missing table, downsizing, exact-fit, fragmentation).

Quick Answer: This question evaluates understanding of algorithmic analysis and data-structure design for memory-constrained scheduling, including efficient lookup and update operations for tables and machines and the selection of placement and migration policies, categorized under Software Engineering Fundamentals.

Related Interview Questions

  • Implement a Connection Pool - Airtable (medium)
  • Explain how to make robust HTTP API calls - Airtable (medium)
Airtable logo
Airtable
Feb 12, 2026, 12:00 AM
Software Engineer
Onsite
Software Engineering Fundamentals
16
0

Algorithmic analysis / code review: Dispatcher for memory-constrained scheduling

You are given a single-threaded in-memory dispatcher that reacts to two kinds of API calls:

Downstream (storage/table) requests

  • CreateTable(tableId, memoryRequired)
  • ResizeTable(tableId, newMemoryRequired)

Upstream (mini-orchestrator) capabilities

  • CreateWorkload(machineId, tableId) (place a table/workload on a machine)
  • MoveWorkload(tableId, fromMachineId, toMachineId)

Problem

The dispatcher must maintain the state of:

  • A set of machines with fixed memory capacities.
  • A set of tables/workloads each requiring some amount of memory.
  • A mapping of which table is placed on which machine.

When a table is created or resized, the dispatcher should:

  1. Check whether the current machine (if already placed) still has enough free memory.
  2. If not, choose a destination machine and move the workload.
  3. If the table is new, choose a machine and place it.

You are handed a correct but inefficient implementation.

Tasks

  1. Analyze the time complexity of the naive approach (typical pitfalls: scanning all machines, repeated recomputation of free memory).
  2. Propose improved data structures to support fast:
    • lookup by tableId and machineId
    • choosing a machine with enough free memory
    • updating free memory after moves/resizes
  3. Propose a reasonable scheduling policy (e.g., first-fit/best-fit) and discuss tradeoffs.

Constraints / clarifications

  • No external database.
  • No multithreading/concurrency concerns.
  • Focus on algorithmic efficiency, correctness, and maintainability.
  • Consider edge cases (missing table, downsizing, exact-fit, fragmentation).

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Software Engineering Fundamentals•More Airtable•More Software Engineer•Airtable Software Engineer•Airtable Software Engineering Fundamentals•Software Engineer Software Engineering Fundamentals
PracHub

Master your tech interviews with 7,500+ 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.