Add ideal algorithm.

Typo: algorithm