Basic algorithm everybody should solve in 5 minutes