algorithm example 5761611