Algorithms are not "what you learn in an algorithms course" and also not "what you are asked to do in a whiteboard interview". Writing an algorithm is what you do when you specify a way to mechanically obtain a solution to a problem, whether you do that in a declarative language or an imperative one or even in a language whose only interpreter is your own head.