Adding sorting and searching algorithms in C, C++, Matlab