changed answer to time and space requirement analyzation