in ' adjacency list thuswhether we use this edge-swapping trick or count identifierwe can implement dfs in-place without affecting its asymptotic running time external memory and caching there are several computer applications that must deal with large amount of data examples include the analysis of scientific data setsthe processing of financial transactionsand the organization and maintenance of databases (such as telephone directoriesin factthe amount of data that must be dealt with is often too large to fit entirely in the internal memory of computer the memory hierarchy in order to accommodate large data setscomputers have hierarchy of different kinds of memorieswhich vary in terms of their size and distance from the cpu closest to the cpu are the internal registers that the cpu itself uses access to such locations is very fastbut there are relatively few such locations at the second level in the hierarchy is the cache memory this memory is considerably larger than the register set of cpubut accessing it takes longer (and there may even be multiple caches with progressively slower access timesat the third level in the hierarchy is the internal memorywhich is also known as main memory or core memory the internal memory is considerably larger than the cache memorybut also requires more time to access finallyat the highest level in the hierarchy is the external memorywhich usually consists of diskscd drivesdvd drivesand/or tapes this memory is very largebut it is also very slow thusthe memory hierarchy for computers can be viewed as consisting of four levelseach of which is larger and slower than the previous level (see figure in most applicationshoweveronly two levels really matter--the one that can hold all data items and the level just below that one bringing data items in and out of the higher memory that can hold all items will typically be the computational bottleneck in this case figure the memory hierarchy