Implementation of several sorting algorithms (chain table)