The Answer is yes, you need to learn algorithm before learning programming languages. Why? We are describing here:
What is Programming?
Programming is the process of taking an algorithm and encoding it into a notation, a programming language, so that it can be executed by a computer. Although many programming languages and many different types of computers exist, the important first step is the need to have the solution.
What is Algorithm?
An algorithm is a detailed series of instructions for carrying out an operation or solving a problem. In a non-technical approach, we use algorithms in everyday tasks, such as a recipe to bake a cake or a do-it-yourself handbook.
Technically, computers use algorithms to list the detailed instructions for carrying out an operation. For example, to compute an employee’s paycheck, the computer uses an algorithm. To accomplish this task, appropriate data must be entered into the system. In terms of efficiency, various algorithms are able to accomplish operations or problem solving easily and quickly.
I think you got your answer from the definition given for algorithm. Algorithm will help us while create a program, once you have the knowledge about that you can easily code or write a program.
If I explain it via an example then we can take mathematics subjects. If you going to solve a question like 4+8*(7/9){(5+6). Then what is the answer you cannot give the answer without having knowledge of BODMAS rule, so same thing is for here. Before going to write a program you need to learn algorithm first.
Why in our college teachers taught us first algorithm then told us now the program will be written as.