Description
Here is pseudocode for the gnome sort using a zero-based array:
procedure gnomeSort(a) pos := 1 while pos < length(a) if (a >= a) pos := pos + 1 else swap a and a if (pos > 1) pos := pos - 1 end if end if end while
end procedure
Read more about this topic: Gnome Sort
Famous quotes containing the word description:
“A sound mind in a sound body, is a short, but full description of a happy state in this World: he that has these two, has little more to wish for; and he that wants either of them, will be little the better for anything else.”
—John Locke (16321704)
“I fancy it must be the quantity of animal food eaten by the English which renders their character insusceptible of civilisation. I suspect it is in their kitchens and not in their churches that their reformation must be worked, and that Missionaries of that description from [France] would avail more than those who should endeavor to tame them by precepts of religion or philosophy.”
—Thomas Jefferson (17431826)
“Once a child has demonstrated his capacity for independent functioning in any area, his lapses into dependent behavior, even though temporary, make the mother feel that she is being taken advantage of....What only yesterday was a description of the childs stage in life has become an indictment, a judgment.”
—Elaine Heffner (20th century)