Basic algorithm