Related: Are algorithm questions acceptable
If you're asking about the mathematical details (e.g. what is its time complexity/how do you prove it correct/how can it be generalized) then your question will fit in perfectly here.
If you're asking a question about the implementation then it should go on Stack Overflow.
The best site for questions about computer science is Computer Science. This includes algorithms and complexity as well as other topics in theoretical and applied computer science.
Theoretical computer science, like theoretical physics, relies heavily on mathematics, so some questions about theoretical computer science are on-topic here on Mathematics.SE, for example the (theoretical) study of algorithms (e.g. correctness, complexity).
Questions about implementing algorithms are on-topic on Stack Overflow. Coding is off-topic on Computer Science, even if the questions arise from a course in a computer science curriculum.
Questions about finding the right algorithm for a particular goal are not driven by mathematical considerations and thus off-topic here. If the consideration is a scientific one (e.g. complexity, type of inputs supported, etc.), such questions belong on Computer Science. If the consideration is an industrial one (e.g. maintainability, availability of libraries, etc.), then Programmers or Stack Overflow would be a better fit.