vector clear function time complexity