dtm space complexity lecture 23 939249