1690 shaares
869 private links
869 private links
This is a not-so-short article teeming with "Aha!" moments.
- reduce all branching in the solution to a math expression
- converted to a lookup algorithm
- we need a perfect hash function
- use multiplication + shr as bit mixer
- store answers directly in a single u32 integer
- cram the answers even tighter with overlaps
The post shows off lot of tricks, very interesting read.