No mom it's not a "messy pile of clothes on my chair" it's an L1 cache for fast random access to my frequently used clothes in O(1) time. It needs to be big to avoid expensive cache misses (looking in my closet). I NEED to be minimizing latency, this is important to me. Please.
you are viewing a single comment's thread
view the rest of the comments
[–] 8 points 7 months ago (1 child)

Not if the pile has a maximum capacity. At that point it's bounded as a fixed constant.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 7 months ago* (last edited 7 months ago)

    Exactly. Since n is represented by the collection of clothes, it is O(1) if you are only going through a finite subset of the clothes. If everything is in the closet, and in no particular order, you would then do O(n) because you potentially have to go through the entire collection to find one article of clothing.

    It gets even worse if your idea of organization is placing the clothes neatly yet with no real order in a closet with multiple drawers and containers inside. In this last scenario you get O(n²) because you now have to repeatedly search through n numbers of clothing containers.

  • source
  • parent