Professional Documents
Culture Documents
Al101 Midterm Assignement-1 PDF
Al101 Midterm Assignement-1 PDF
Al101 Midterm Assignement-1 PDF
ASSIGNMENT:
Direction: Answer the following question. Write your answer on the space provided.
1. Define and discuss the data structures and Differentiate the different types of data structures.
Arrays: A set of elements, each of which is identified by an index or key. Array elements are stored in
adjacent memory locations.
Linked Lists: A set of elements, each with a reference to the next element. Linked lists can be singly or
doubly linked
Stack: A last-in, first-out (LIFO) data structure that adds and removes elements from the top of the stack.
Queue: A first in, first out (FIFO) data structure in which elements are added to the back of the queue and
removed from the front.
Tree: A hierarchical data structure with one or more child elements for each element. Except for the root
element, each element has a parent element.
Graph: A data structure made up of a finite set of vertices and a set of Edges that connect these vertices.
Hash Table: A data structure that stores key-value pairs and allows for efficient key-based lookups,
insertions, and deletions.