Yes, but it suffers from a large amount of space complexity, and probably would have high constant factors in practice.
So what I wrote debunks your assumptions and proves your argument wrong.
This is how conversations normally go.
>All O(1) with lookup table!