美文网首页
Data Structure Week1 Arrays

Data Structure Week1 Arrays

作者: 爱跑步的coder | 来源:发表于2018-03-24 10:41 被阅读0次

    Definition of Array:

    Contiguous area of memory consisting of equal-size elements indexed by contiguous integers.

    What's Special About Arrays?

    Constant-time access
    array_addr + elem_size * (i - first_index)

    How to get the address of multi-dimensional arrays?

    image.png

    Row-major,row keep unchanged,and column add.In column-major ordering, the first index changes most rapidly.

    image.png

    相关文章

      网友评论

          本文标题:Data Structure Week1 Arrays

          本文链接:https://www.haomeiwen.com/subject/zycqcftx.html