Shellsort story

from Maha Hadaya

Once upon a time, Yami Yugi had a huge array of yugioh cards that needed to be sorted . Since he had collected them all, there were too many for a deck, so , he decided to go and separate his cards into stacks. Each deck could only hold 40 cards, since any more cards would decrease his drawing power. Having a limited amount of time , Yami realized he could not just trust the heart of the cards, such that it was up to him to sort his cards out manually. He broke the cards into stacks of 40 , in order to prevent the deck from spilling over when he used his deck box to separate the stacks. Now he had all the stacks, and decided to sort all of his stacks going from the top of the deck and comparing the second card and continuing with n to n+1. Spells and Traps had 0 atk, so they were moved to the top of the sets of 40. Now that Yami had his sets of yugioh cards sorted, he could sort everything by comparing stacks in the style of insertion sort as he had each individual stack.

yamiyugioh