3 ms·
If using powers-of-two, you'd bitwise-OR rather than multiply the values-per-character. Simpler op, and your accumulated value per string never rises (in the 26
by gojomo 16y ago
If using powers-of-two, you'd bitwise-OR rather than multiply the values-per-character. Simpler op, and your accumulated value per string never rises (in the 26-letter case) above 2^26.
- StavrosK 16y agoYep, that's what I meant, thanks. Powers-of-two is just for getting the correct bits.