AlgoViz

Design an inventory management system

medium 80 min

Count goods in several places, promise them to orders without ever promising too much, ship or let go, and explain every count.

Watch lesson4:28

How to approach it

What this question tests, where it gets hard, and how to spend the time.

Read the question

What this problem tests

It looks like a map from a name to a number. The interviewer waits to see whether you notice time: between the promise and the parcel there are minutes or days, and in between the number has two meanings.

Where the 45 minutes go

MinutesDoHave on the board
0 to 5AskPlaces, split, all or nothing, time to pay, threads
5 to 10Numbers and verbsThe table of what each verb changes
10 to 17ClassesFive boxes
17 to 32CodeLine, reserve, ship
32 to 37VerifyLast jar, half order, late ship
37 to 45ExtendWhat they ask, or expiry and locks

Four questions before you draw

  1. 1

    What is counted?

    A product in a place. That pair is the class.

  2. 2

    Which numbers are stored?

    Two. The third is a difference.

  3. 3

    What ends a promise?

    Ship, release, or the clock. Exactly one of them.

  4. 4

    What must be one step?

    Checking all products and holding all of them.

Memory

TAGS

Two counts. All or nothing. Give back by picks. Sum of the ledger.