Maybe the interviewers where actually testing your education in algorithms rather than your ability to come up with an algorithm. It is quite easy to come up with an algorithm for sorting (Bubblesort, etc.). Its quite hard to develop an algorithm like Quicksort without education in existing algorithms.
Another thing is that while you can phrase math/formulae/algorithms in different ways and they - in essence - mean the same thing, another person might not understand your view if the person knows the other formulation of the principle. If you have a physics background you might use different notation than a person with a maths background or a CS background (even within fields there is an abundance of different notations). So for example a CS person looking for geometry skills and asking about transformations might look for certain "buzz words" like transformation matrices and matrix multiplication while a person with a physics background would definitely know how to transform a coordinate system but might start to talk about vectors and pseudo-vectors and invariants under transformation. The physics person of course is convinced to have shown understanding, the CS person might thing: "what weird stuff was the interviewee talking about?"
Bottom line: don't take it personal, there is a certain amount of randomness in hiring and interviews.
Also: Did you stay calm or did you appear stressed out? Did you show interest in the question or was it more of a "chore". Maybe it was not your algorithm or math skills that got you off the list but "soft skills".