In this paper we address the problem of state (resp. feedback) linearization of nonlinear single-input control systems using state (resp. feedback) coordinate transformations. Although necessary and sufficient geometric conditions have been provided in the early eighties, the problems of finding the state (resp. feedback) linearizing coordinates are subject to solving systems of partial differential equations. We will provide here a solution to the two problems by defining algorithms allowing to compute explicitly the linearizing state (resp. feedback) coordinates for any nonlinear control system that is indeed linearizable (resp. feedback linearizable). Each algorithm is performed using a maximum of $n-1$ steps ($n$ being the dimension of the system) and they are made possible by explicitly solving the Flow-box or straightening theorem. We illustrate with several examples borrowed from the literature.