complexity and algorithms 7806575