• grue@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 months ago

    You want to think your pile is O(1) for retrieval, but it’s actually O(n).

    Meanwhile, the closet actually is O(1) for retrieval, but you don’t want to spend the time for the bulk insert it requires beforehand.