An algorithm is a finite sequence of logical steps used to solve a problem or perform a task.
It represents the logic of a program before implementation in any programming language.
Therefore,
\[
\boxed{\text{Algorithm}}
\]
is the correct answer.
Hence,
\[
\boxed{(B)}
\]