Gnome Sort
   HOME





Gnome Sort
Gnome sort (nicknamed stupid sort) is a variation of the insertion sort sorting algorithm that does not use nested loops. Gnome sort was known for a long time and used without naming it explicitly. It was then popularized by Iranian computer scientist Hamid Sarbazi-Azad (professor of Computer Science and Engineering at Sharif University of Technology) in 2000. The sort was first called ''stupid sort'' (not to be confused with bogosort), and then later described by Dick Grune and named ''gnome sort''. Gnome sort performs at least as many comparisons as insertion sort and has the same asymptotic run time characteristics. Gnome sort works by building a sorted list one element at a time, getting each item to the proper place in a series of swaps. The average running time is ''O''(''n''2) but tends towards ''O''(''n'') if the list is initially almost sorted.''Almost sorted'' means that each item in the list is not far from its proper position (not farther than some small constant ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Sorting Algorithm
In computer science, a sorting algorithm is an algorithm that puts elements of a List (computing), list into an Total order, order. The most frequently used orders are numerical order and lexicographical order, and either ascending or descending. Efficient sorting is important for optimizing the Algorithmic efficiency, efficiency of other algorithms (such as search algorithm, search and merge algorithm, merge algorithms) that require input data to be in sorted lists. Sorting is also often useful for Canonicalization, canonicalizing data and for producing human-readable output. Formally, the output of any sorting algorithm must satisfy two conditions: # The output is in monotonic order (each element is no smaller/larger than the previous element, according to the required order). # The output is a permutation (a reordering, yet retaining all of the original elements) of the input. Although some algorithms are designed for sequential access, the highest-performing algorithms assum ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Asymptotic Run Time
Big ''O'' notation is a mathematical notation that describes the limiting behavior of a function when the argument tends towards a particular value or infinity. Big O is a member of a family of notations invented by German mathematicians Paul Bachmann, Edmund Landau, and others, collectively called Bachmann–Landau notation or asymptotic notation. The letter O was chosen by Bachmann to stand for ''Ordnung'', meaning the order of approximation. In computer science, big O notation is used to classify algorithms according to how their run time or space requirements grow as the input size grows. In analytic number theory, big O notation is often used to express a bound on the difference between an arithmetical function and a better understood approximation; one well-known example is the remainder term in the prime number theorem. Big O notation is also used in many other fields to provide similar estimates. Big O notation characterizes functions according to their growth rate ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Zero-based Array
In computer science, array is a data type that represents a collection of ''elements'' (values or variables), each selected by one or more indices (identifying keys) that can be computed at run time during program execution. Such a collection is usually called an array variable or array value.Robert W. Sebesta (2001) ''Concepts of Programming Languages''. Addison-Wesley. 4th edition (1998), 5th edition (2001), By analogy with the mathematical concepts vector and matrix, array types with one and two indices are often called vector type and matrix type, respectively. More generally, a multidimensional array type can be called a tensor type, by analogy with the mathematical concept, tensor. Language support for array types may include certain built-in array data types, some syntactic constructions (''array type constructors'') that the programmer may use to define such types and declare array variables, and special notation for indexing array elements. For example, in the Pascal p ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Pseudocode
In computer science, pseudocode is a description of the steps in an algorithm using a mix of conventions of programming languages (like assignment operator, conditional operator, loop) with informal, usually self-explanatory, notation of actions and conditions. Although pseudocode shares features with regular programming languages, it is intended for human reading rather than machine control. Pseudocode typically omits details that are essential for machine implementation of the algorithm, meaning that pseudocode can only be verified by hand. The programming language is augmented with natural language description details, where convenient, or with compact mathematical notation. The reasons for using pseudocode are that it is easier for people to understand than conventional programming language code and that it is an efficient and environment-independent description of the key principles of an algorithm. It is commonly used in textbooks and scientific publications to document ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Flowerpot
A flowerpot, planter, planterette or plant pot is a container in which flowers and other plants are cultivated and displayed. Historically, and still to a significant extent today, they are made from plain terracotta with no ceramic glaze, with a round shape, tapering inwards. Flowerpots are now often also made from plastic, metal, wood, Rock (geology), stone, or sometimes biodegradable material. An example of biodegradable pots are ones made of heavy kraft paper, brown paper, cardboard, or sphagnum, peat moss in which young plants for transplanting are grown. For seedling starting in commercial greenhouses or polytunnels, pots usually take the form of trays with cells, each cell acting as one small pot. These trays are often called flats. There are usually holes in the bottom of pots, to allow excess water to flow out, sometimes to a saucer that is placed under the flowerpot. Purpose Flowerpots have a number of uses such as transporting plants to new locations, starting se ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Garden Gnome
Garden gnomes () are lawn ornament figurines of small humanoid creatures based on the mythological creature and diminutive spirit which occur in Renaissance magic and alchemy, known as gnomes. They also draw on the German folklore of the Dwarf (folklore), dwarf. Traditionally, the garden figurines depict male dwarfs wearing red pointy hats. Typically, gnomes stand between . Originating as a decoration for the wealthy in Europe, garden gnomes are now prevalent in gardens and lawns throughout the Western world, among all social classes. They are regarded by some as kitsch. History Ancient predecessors In ancient Rome, small stone statues depicting the Greco-Roman fertility god Priapus, also a protector of beehives, flocks, and vineyards, were frequently placed in Roman gardens. Gnomes as magical creatures were first described during the Renaissance period by Swiss alchemist Paracelsus as "diminutive figures two spans in height who did not like to mix with humans". During this per ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Big O Notation
Big ''O'' notation is a mathematical notation that describes the asymptotic analysis, limiting behavior of a function (mathematics), function when the Argument of a function, argument tends towards a particular value or infinity. Big O is a member of a #Related asymptotic notations, family of notations invented by German mathematicians Paul Gustav Heinrich Bachmann, Paul Bachmann, Edmund Landau, and others, collectively called Bachmann–Landau notation or asymptotic notation. The letter O was chosen by Bachmann to stand for '':wikt:Ordnung#German, Ordnung'', meaning the order of approximation. In computer science, big O notation is used to Computational complexity theory, classify algorithms according to how their run time or space requirements grow as the input size grows. In analytic number theory, big O notation is often used to express a bound on the difference between an arithmetic function, arithmetical function and a better understood approximation; one well-known exam ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  




Dick Grune
Dick Grune is a Dutch computer scientist and university lecturer best known for inventing and developing the first version of the Concurrent Versions System (CVS). Grune was involved in the construction of Algol 68 compilers in the 1970s and the Amsterdam Compiler Kit in the 1980s. He also named gnome sort Gnome sort (nicknamed stupid sort) is a variation of the insertion sort sorting algorithm that does not use nested loops. Gnome sort was known for a long time and used without naming it explicitly. It was then popularized by Iranian computer sci ..., a sorting algorithm invented by Hamid Sarbazi-Azad, who originally published it under the name ''stupid sort''. Selected publications * Henri E. Bal and Dick Grune. ''Programming Language Essentials''. Addison-Wesley, 1994. . * Dick Grune and Ceriel J. H. Jacobs. ''Parsing Techniques: A Practical Guide'' (Second Edition). Springer, 2008. . * Dick Grune, Kees van Reeuwijk, Henri E. Bal, Ceriel J. H. Jacobs, and Koen G. Langen ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Array Data Structure
In computer science, an array is a data structure consisting of a collection of ''elements'' (value (computer science), values or variable (programming), variables), of same memory size, each identified by at least one ''array index'' or ''key'', a collection of which may be a tuple, known as an index tuple. An array is stored such that the position (memory address) of each element can be computed from its index tuple by a mathematical formula. The simplest type of data structure is a linear array, also called a one-dimensional array. For example, an array of ten 32-bit (4-byte) integer variables, with indices 0 through 9, may be stored as ten Word (data type), words at memory addresses 2000, 2004, 2008, ..., 2036, (in hexadecimal: 0x7D0, 0x7D4, 0x7D8, ..., 0x7F4) so that the element with index ''i'' has the address 2000 + (''i'' × 4). The memory address of the first element of an array is called first address, foundation address, or base address. Because the mathematical conc ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Bogosort
In computer science, bogosort (also known as permutation sort and stupid sort) is a sorting algorithm based on the generate and test paradigm. The function successively generates permutations of its input until it finds one that is sorted. It is not considered useful for sorting, but may be used for educational purposes, to contrast it with more efficient algorithms. The algorithm's name is a portmanteau of the words ''bogus'' and ''sort''. Two versions of this algorithm exist: a deterministic version that enumerates all permutations until it hits a sorted one,. and a randomized version that randomly permutes its input and checks whether it is sorted. An analogy for the working of the latter version is to sort a deck of cards by throwing the deck into the air, picking the cards up at random, and repeating the process until the deck is sorted. In a worst-case scenario with this version, the random source is of low quality and happens to make the sorted permutation unlikely to o ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Sharif University Of Technology
Sharif University of Technology (SUT); (, romanized : Dāneshgāh-e sana'ti-e sharif) is a public research university in Tehran, Iran. It is widely considered to be the nation's most prestigious and leading institution for science, technology, engineering, and mathematics ( STEM) fields. Admission to Sharif is highly competitive and it is traditionally the first choice of the top students in the Iranian University Entrance Exam and Olympiads. Established in 1966 under the reign of Mohammad Reza Shah Pahlavi, it was formerly named in his honor as Aryamehr University of Technology () and for a short period after the 1979 revolution, the university was called Tehran University of Technology but then it was renamed to Sharif University of Technology after Majid Sharif Vaghefi, a leading member of People's Mojahedin Organization of Iran. Today, the university provides both undergraduate and graduate programs in 15 main departments. The student body consists of about 6,000 un ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]