Adding selection sort implementation.