Correct runtime complexity