opt space complexity