zoukankan      html  css  js  c++  java
  • link them together by means of pointers

    Computer Science An Overview _J. Glenn Brookshear _11th Edition

    An alternative to storing a heterogeneous array in a block of contiguous memory cells is to store each component in a separate location and then link them together by means of pointers. More precisely, if the array contains three components, then we find a place in memory to store three pointers, each of which points to one of the components (Figure 8.7b). If these pointers are stored in a block starting at address x, then the first component can be found by following the pointer stored at location x, the second component can be found by following the pointer at location x  1, and so forth.

    This arrangement is especially useful in those cases in which the size of the array’s components is dynamic. For instance, by using the pointer system the size of the first component can be increased merely by finding an area in memory to hold the larger component and then adjusting the appropriate pointer to point to the new location. But if the array were stored in a contiguous block, the entire array would have to be altered.

    Implementing Data Structures  数据结构的实现 

    Storing Arrays Heterogeneous Arrays  异构数组的存储

  • 相关阅读:
    R 读取xls/xlsx文件
    网页免费转换为可编辑的PDF
    Python: NumPy, Pandas学习资料
    鱼油资料
    Activity的四种启动模式和onNewIntent()
    Android Service、IntentService,Service和组件间通信
    Activity生命周期
    Node.js学习起步
    Android 技能图谱学习路线
    Blog
  • 原文地址:https://www.cnblogs.com/rsapaper/p/6061426.html
Copyright © 2011-2022 走看看