Apostoliko–Đankarlov algoritam