Finally programmed the sequence shuffling algorithms