Week 8 - 9 Flashcards
1
Q
is a data structure in which each node points to another node. Unlike arrays, which have a fixed size, a — is a dynamic data structure that can allocate and deallocate memory at runtime. There are two types of linked lists discussed in this chapter: singly and doubly linked lists.
A
A linked list
2
Q
is the simplest kind of linked lists. It takes up less space in memory because each node has only one address to the next node, like in the image below.
A
A singly linked list
3
Q
can be thought of as a bidirectional singly linked list. Each node in the doubly linked list has both a next pointer and a prev pointer.
In addition, a —— has a head pointer as well as a tail pointer.
A
A doubly linked list