- Definition of algorithms
An algorithm is a procedure for solving a mathematical problem in a finite number of steps that frequently involves repetition of an operation. [Merriam Webster]
It just means:
Defined input
Defined instructions
Defined or desried output
Finite Number of operations
You put something in it, it will be handled in a certain way and after some time you'll get a result.
- Definition of data structures
A data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data. [Encyclopedia of Computer Science, 4th Ed.]
Examples:
Array:
Data values: int [] arr = new int [3];
Relationships: boolean eq = arr.equals(arr2);
F&O: int size = arr.lengh();