Why exactly do we need a “Circular Linked List” (singly or doubly) data structure?

前端 未结 10 1072
無奈伤痛
無奈伤痛 2021-01-30 08:27

Why exactly do we need a \"Circular Linked List\" (singly or doubly) data structure?

What problem does it solve that is evident with simple Linked Lists (singly or doubl

10条回答
  •  北荒
    北荒 (楼主)
    2021-01-30 09:23

    Circular linked lists (singly or doubly) are useful for applications that need to visit each node equally and the lists could grow. If the size of the list if fixed, it is much more efficient (speed and memory) to use circular queue.

提交回复
热议问题