3 ms·
Shouldn't it be O(N)? I mean, the time taken to pack and send your products will still scale linearly with the number of customers, right?
by hugh 19y ago
Shouldn't it be O(N)? I mean, the time taken to pack and send your products will still scale linearly with the number of customers, right?
- brlewis 19y agoYou raise a good point, but O(1) is a much better punch line.
- tel 19y agoIt's definitely more stark, but O(N) would have gotten a chuckle from the intended audience and a nod to Randall for getting his complexity right. But I'm just advocating for the devil...
- hugh 19y agoWell, just to argue against my original point, the scaling of the travelling salesman problem usually applies to the time taken to figure out the optimal route, not the time taken to actually traverse it, which is O(N). If you're just looking at the route-planning stage, then the "sod it, I'll just sell on eBay" algorithm is indeed O(1).