Skip to content

Latest commit

 

History

History
63 lines (39 loc) · 1.25 KB

File metadata and controls

63 lines (39 loc) · 1.25 KB

{Algorithm Name}

Overview

{2-3 sentence description of what the algorithm does and when you would use it.}

How It Works

{Step-by-step explanation. Walk through a small example showing each step of the algorithm.}

Example

Given input: {example input}

  1. {Step 1 description}
  2. {Step 2 description}
  3. {Step 3 description}

Result: {example output}

Pseudocode

function algorithmName(input):
    {pseudocode here}

Complexity Analysis

Case Time Space
Best O({best}) O({space})
Average O({avg}) O({space})
Worst O({worst}) O({space})

Why these complexities?

{Explanation of why the time complexity is what it is. What drives the best/worst case?}

When to Use

  • {Use case 1}
  • {Use case 2}

When NOT to Use

  • {Anti-pattern 1}
  • {Anti-pattern 2}

Comparison with Similar Algorithms

Algorithm Time (avg) Space Stable Notes
{This} O({avg}) O({s}) {Y/N} {note}
{Related} O({avg}) O({s}) {Y/N} {note}

Implementations

{Auto-generated links — do not edit manually}

References

  • {Link to original paper, textbook reference, or authoritative source}