I agree that memorizing algorithms is useful. That said, Google interview questions are usually much easier than deriving Ukkonen's algorithm or FFT on your own. They are more like "given a rotated sorted array, find a given value quickly". Well, a bit harder than that, but solvable in 40 min.