3 ms·
Why don't you just scan the alcohol last then?
by jon889 3y ago
Why don't you just scan the alcohol last then?
- kevincox 3y agoBecause you still need to wait for the attendant to come. But you have no chance of scanning other items in parallel. (Assuming you don't know if this store will block scanning) It is always optimal to scan these first. You have two cases: Blocking: scan 1 + wait for attendant + scan rest Non-blocking: scan 1 + max(wait for attendant, scan rest) However if you scan these items last the wait is always the same: scan rest + scan 1 + wait for attendant This is never shorter than either of the previous two. It is equivalent to the blocking case and almost always longer than the non-blocking case.
- throw1234651234 3y ago^ This post is just in case you forgot you were on hacker news.
- d1sxeyes 3y agoI agree it's a beautifully crafted response, and have nothing to add, it's exactly what my point was.