complexity time and space 1369249