An algorithm is a finite set of unambiguous instructions for completing a task that must have definite inputs and outputs and terminate after a finite number of steps. Algorithms can be represented using pseudocode, which uses a simple English-like syntax. There are three basic algorithmic structures: sequence, selection, and repetition. Performance of algorithms is analyzed based on time and space complexity, which measure how computational resources like memory and time grow relative to the size of the problem input.