官术网_书友最值得收藏!

Summary

We covered a few basic data structures and the algorithms for manipulating them. In addition to this, we also found out their running time complexities. To summarize this, an array provides you with the fastest random access there is with this time complexity: O(1). But arrays cannot change size; the only modification they allow is to change the value of an element. A linked list allows fast append at the end and insertion at the beginning at O(1) time. However, O(1) removal is only available for removing the first element. This is resolved by a doubly linked list that also allows O(1) removal from the end. A circular linked list holds a reference to the first element in the next reference of the last element. This makes the list a circular structure that allows one to loop indefinitely.

In the upcoming chapters, we will discuss the abstraction of data structures called abstract data types. We will use the data structures we have seen in this chapter to implement the abstract data types, which in turn will be used in later chapters.

主站蜘蛛池模板: 莫力| 凤山县| 丹东市| 大悟县| 信丰县| 嘉定区| 阿拉善右旗| 屏东县| 湖南省| 库车县| 石城县| 观塘区| 内黄县| 鹿邑县| 手游| 湘阴县| 务川| 安丘市| 视频| 天台县| 贵阳市| 静安区| 临武县| 堆龙德庆县| 十堰市| 游戏| 调兵山市| 东阿县| 临江市| 潜江市| 周至县| 罗平县| 拜城县| 林周县| 六盘水市| 拉萨市| 乌兰县| 海晏县| 丹寨县| 茶陵县| 新竹市|