Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Example  





2 Usage  














Template:Infobox algorithm






العربية


الدارجة
Eesti
Español
فارسی
Français

Հայերեն
Italiano

Latviešu
Македонски


Norsk bokmål
Polski
Português
Русский
Slovenščina
Српски / srpski
Svenska
Tagalog

Türkçe
Українська
Tiếng Vit

 

Edit links
 









Template
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 





Permanently protected template

From Wikipedia, the free encyclopedia
 

(Redirected from Template:Infobox Algorithm)

Infobox algorithm

Example

Quicksort Algorithm

Quicksort Algorithm
Animated visualization of the quicksort algorithm. The horizontal lines are pivot values.
ClassSorting algorithm
Worst-case performanceO(n2)
Best-case performanceO(n log n) (simple partition)
or O(n) (three-way partition and equal keys)
Average performanceO(n log n)
Worst-case space complexityO(n) auxiliary (naive)
O(log n) auxiliary (Hoare 1962)
OptimalNo

Usage

{{Infobox algorithm
|name           = <!-- Defaults to article name -->
|class          = <!-- Name of problem it solves -->
|image          = <!-- filename only, no "File:" or "Image:" prefix, and no enclosing [[brackets]] -->
|caption        =
|data           =
|time           = <!-- Worst time big-O notation -->
|best-time      =
|average-time   =
|space          = <!-- Worst-case space complexity; auxiliary space
                       (excluding input) if not specified -->
}}

Infobox describing an algorithm

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Namename

Name of algorithm

Default
{{PAGENAMEBASE}}
Auto value
{{PAGENAMEBASE}}
Contentrequired
Problem classclass

Type of problem it solves

Example
Sorting
Auto value
Contentrequired
Imageimage

filename only, no 'File:' or 'Image:' prefix, and no enclosing [[brackets]]

Contentoptional
Image sizesize image size imagesize image_size

no description

Unknownoptional
Alt textalt

Alt text for image

Stringoptional
Captioncaption

no description

Contentoptional
Data structuredata

Data structure operated upon

Example
Array
Contentrequired
Worst-case time complexitytime

Worst-case time complexity in big O notation

Example
O(n)
Contentrequired
Best-case time complexitybest-time

no description

Contentoptional
Average time complexityaverage-time

no description

Contentoptional
Worst-case space complexityspace

If not specified, this should be auxiliary space complexity and not include the space needed for the input

Example
O(1)
Contentrequired

Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Infobox_algorithm&oldid=1181245409"

Categories: 
Infobox templates
Lua-based templates
Computer science infobox templates
Hidden category: 
Wikipedia semi-protected templates
 



This page was last edited on 21 October 2023, at 20:34 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki