Select Second Smallest Algorithm