Many times the interviewer asks you about the algorithm, not the algorithm. Because many of these things can be washed out through a day or two of hard work, it depends more on your thinking and attitude to solve problems. To put it bluntly, it is the ability to solve problems. You spend less time and get good results, and you win.
When it comes to the requirements of front-end Web development for mathematics, to be honest, it won't be used much in actual coding, and junior high school level is enough. Except that a matrix in CSS3 is used in linear algebra, I haven't encountered more advanced mathematics for the time being (of course, if I focus on vision and animation, that's another matter).