Is copying an algorithm plagiarism? My question is very similar to this one, but I'm curious about algorithms. The accepted answer states that:


  Mathematical equations are not normally considered subject to plagiarism ...


I am wondering if the same would apply to algorithms. I think they are very similar to equations, except for the use of sentences (in the case of pseudo code). If it is made clear where the algorithm came from, would it be ok to copy?
Plagiarism is passing someone else's work as your own. If the source is referenced, then there is no plagiarism. 

Quoting the whole algorithm verbatim may be considered as bad writing style, may be against a particular journal's rules, or may simply demonstrate a certain lack of creativity. However, this is not a plagiarism, as long as the source is cited.