A data structure is a collection of data elements that have one or more specific relationships with each other. Includes four basic structures: set, linear structure, tree structure, graphic structure or net structure. Popular point is the logical structure of data, such as what kind of structure these data are in memory.
An algorithm is actually a method used to accomplish one thing in the programming process. For example, if you do a math problem in real life, both people will finish it, but one of them takes a short time because of its simple method. Similarly, using good algorithms in the programming process can reduce the temporal and spatial complexity of the program.