A data structure is an effective way in which data can be stored on a computer. The data structure is termed as a specialized format that has a named storage location where we can easily organize, process, retrieve, and store data.
An algorithm is a set of instructions, or you can say it is a step-by-step process that involves the instructions for solving logical and mathematical problems.