4 ms·
Maybe they want the median age in number of days?
by layer8 4y ago
Maybe they want the median age in number of days?
- mattkrause 4y agoAssuming Methuselah doesn't work for you, you can still do that in about 200k of memory.
- layer8 4y agoOnly at the cost of poor cache locality. :)
- mattkrause 4y agoShouldn't it fit completely in L1 (or at worst, L2)? You need roughly 146,100 bytes: 120 years * 365.25 days/year * 4 bytes/day (uint32 as an accumulator) = 175,320 kb. MacBooks have something like 192 kb shared + 128 kb/core, so that should be okay if not much else is going on....