easiest algorithm