when reading Magnus Lie Hetland"s python algorithm tutorial, there are some questions.
Chapter 2 after-class exercise
2-2 Let"s make an assumption (which may be a little impractical): if we allow uninitialization when allocating memory (that is, this piece of memory still contains "junk data" from the last time it was used), and it only takes a constant time to allocate memory. At this point, if you want to create an array of n integers and want to track each of its items-- see if it is uninitialized, or if you have already saved a number in it. This kind of check operation can also be done in a constant time. So, what should we do to ensure that it completes its initialization within Changshu time? (and how can an an initialize an empty adjacency array in constant time to prevent it from becoming an operation with a square time as the minimum running time? )
this answer does not understand what does it mean? emmmmm asks the boss to explain _ (: "oblique") _
the pictures of questions and answers are as follows