Memory efficiency is an important aspect to be considered while designing data structure and algorithms. Memory can be broadly classified into two types:
- Main memory (RAM)
- External storage such as hard disk, CD ROM, tape, and so on
Data stored in main memory (RAM) has minimal access time thus preferred by most of the algorithms, whereas, if the data is stored in external drives then access times become critical, as it usually takes much longer to access data from external storage. Also, as the data size increases, retrieval become an issue. To deal with this issue data is stored in chunks as pages, blocks, or allocation units in external storage devices and indexing is used to retrieve these blocks efficiently. B-trees are one of the popular ...