complexity of algorithms 3845724