Implemented functions

Sort and create_random_array in a very easy way
Malloc of matrix for calculations added

Implemented with several mallocs for each pointer.