1.4.2 Data Structures Flashcards
What is a stack?
-A stack is a linear data structure that follows LIFO.
-It allows insertion and deletion of elements at only one end call the top.
What is a queue?
-A queue is a linear data structure that follows FIFO.
-It allows insertion of elements at one end called the rear and deletion of elements at the front.
What is a linked list?
-A linked list a is a data structure that consists of a series of nodes.
-Each node contains a value and reference to the next node in the list.
-It allows for efficient insertion and deletion.
What is a tree?
- non linear data structure
-it has a root node and each node can have one or more child nodes.
-they can be used for searching and sorting
What is a node?
-A node is a point in a system where data is stored, processed or passed between other points.
What is a hash table?
-A hash table uses a hash function to map keys to indices in an array
-Commonly used in to implement dictionaries and sets
What us a heap?
- It is specialized tree based structure that states that either the parent node is less than or equal to or greater than each of its children
-Used for sorting finding min and max element in a set
What is an array?
-An array is a linear data structure that stores a fixed size collection of elements of the same type.
What is priority queue?
-its a data structure that stores elements with priority values and allows for efficient extraction of the element with the highest or lowest priority
What is a tuple?
-similar to a list but it is immutable (the elements within it can not be modified or changed)