翻訳と辞書 |
bogosort
In computer science, bogosort〔 (also stupid sort,〔E. S. Raymond. "bogo-sort". ''The New Hacker’s Dictionary''. MIT Press, 1996.〕 slowsort,〔.〕 random sort, shotgun sort or monkey sort) is a particularly ineffective sorting algorithm based on the generate and test paradigm. It is not useful for sorting, but may be used for educational purposes, to contrast it with other more realistic algorithms; it has also been used as an example in logic programming.〔〔 If bogosort were used to sort a deck of cards, it would consist of checking if the deck were in order, and if it were not, throwing the deck into the air, picking the cards up at random, and repeating the process until the deck is sorted. Its name comes from the word ''bogus''. ==Description of the algorithm== The following is a description of the algorithm in pseudocode: while not isInOrder(deck): shuffle(deck)
抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「bogosort」の詳細全文を読む
スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース |
Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.
|
|