User:Nagare/template-algorithm-page

Start your algorithm with formal defination. Clearly specify the source of the algorithm where it was first published.

Algorithm
Describe the algorithm in plain words. Explain how it works as if you were explaining it to your junior colleague. Outline all the steps; if it is representative of a certain algorithm design technique, say so and link to the page describing that technique.

Example
This is one part of the page you need to work out completely on your own. Pick up an example -- not too big, but not a trivial size, and explain it step-by-step. Sometime you might even want to make an animation illustrating the run of your algorithm (like on Dijkstra's algorithm page, for example).

Pseudocode
Give pseudocode (see other pages for the format). Make sure you reference the sources for your pseudocode! Don't make it too specific; if it relies on other algorithms or data structures, just say so and give links (e.g., code for Kruskal's algorithm does not need to have an implementation of Union-Find; you would just say "check if two vertices are in the same connected component", and, after the pseudocode, explain that this check is done using Union-Find data structure (linking to it).

Complexity
Discuss complexity (running time, space, etc) of the algorithm. Make sure you provide an explanation why the complexity is such as it is, especially if it is non-trivial -- but again, use plain language.

Proof of correctness
Give a high-level intuitive explanation why the algorithm works. You don't need to be technical (it shouldn't be technical), but try to explain it in such a way that a reader would be convinced that the algorithm indeed does what it supposed to do.

Applications
Find a few real-world applications of your algorithm. Describe how the algorithm is used in various applications, and give references to the applications pages.

Variations
Describe variations of the algorithm you are doing (if any). For example, Kruskal's algorithm variation is when edges are considered in descending order.

Related algorithms
Discuss other algorithms for this problem. Here, you need to do some research to find out strengths and weaknesses of various related algorithms: for example, Bellman-Ford algorithm works with negative weights, but Dijkstra's is faster.

Other material
There are other sections you might want to add, depending on your problem. For example, you might have a section describing implementations of your algorithm -- especially if there are interesting ones, e.g. in parallel setting.