3 ms·
I think it's not a bad list to weed out the cheats, though perhaps #4 and #5 weed a bit too wide. I solved #4 a couple weeks ago after a friend of mine who int
by gnuvince 11y ago
I think it's not a bad list to weed out the cheats, though perhaps #4 and #5 weed a bit too wide. I solved #4 a couple weeks ago after a friend of mine who interviewed for Google was asked exactly this (he didn't whine, and eventually got a working solution), and it did take me the better part of an hour fixing up the edge cases.