Implementation of basic sorting algorithms and binary search