wk5&&6 (LinkedLists)

 0    10 fiszek    up804653
ściągnij mp3 drukuj graj sprawdź się
 
Pytanie English Odpowiedź English
Define a linear data structure
rozpocznij naukę
Linear data structure: a collection of nodes (elements) where each node has a unique predecessor and a unique successor.
what are the disadvantages of an array compared to a linked list
rozpocznij naukę
An array is a static structure Disadvantages of using arrays: Cannot be easily extended or reduced to fit the data set. Can be expensive to maintain
Define a linked list
rozpocznij naukę
Linked list is a collection of objects, called nodes Every node has two components information to be stored (the data) reference to the next node (often called a link).
What is meant by a dynamic data structure?
rozpocznij naukę
The number of nodes in the list is not fixed. The linked list can grow and shrink on demand.
What are the advantages of a linked list
rozpocznij naukę
Easily extended or reduced to fit the data set. Efficient O(1) to insert/delete item, once located.
What are the disadvantages of linked lists
rozpocznij naukę
Does not allow direct access to individual items. To access a particular item: Start at the head and then Follow references until you get to the item O(n) Uses more memory compared to an array: Need to store a reference to the next node.
What is a singly linked list?
rozpocznij naukę
A linked list that goes in one direction from start to end
what is a circularly linked list?
rozpocznij naukę
the last node of a SSl links to the firts node
What is a doubly linked list?
rozpocznij naukę
each node has the address of the previous and the next node
what is a skip list?
rozpocznij naukę
data structure that allows fast search within an ordered sequence of elements. Fast search is made possible by maintaining a linked hierarchy of subsequences, with each successive subsequence skipping over fewer elements than the previous one.

Musisz się zalogować, by móc napisać komentarz.