Algoritam sa prostom linijskom strukturom