1 Lecture
CS301
Midterm & Final Term Short Notes
Introduction to Data Structures
Introduction to Data Structures is a fundamental course that teaches students about the organization and storage of data in computer memory. This course covers key topics such as arrays, linked lists, stacks, queues, trees, and graphs. It provid
Important Mcq's
Midterm & Finalterm Prepration
Past papers included
Download PDF
Which data structure follows the "last-in-first-out" (LIFO) principle? a. Queue b. Stack c. Linked List d. Tree Solution: b
Which data structure allows for efficient insertion and deletion operations in the middle? a. Array b. Stack c. Queue d. Linked List Solution: d
Which data structure is used to represent hierarchical relationships? a. Array b. Stack c. Queue d. Tree Solution: d
Which data structure is used to find the shortest path between two nodes in a network? a. Array b. Stack c. Queue d. Graph Solution: d
Which data structure stores elements in a non-linear and hierarchical manner? a. Array b. Stack c. Queue d. Tree Solution: d
Which data structure follows the "first-in-first-out" (FIFO) principle? a. Queue b. Stack c. Linked List d. Tree Solution: a
Which data structure is used to reverse the order of elements in a sequence? a. Array b. Stack c. Queue d. Linked List Solution: b
Which data structure is used to implement a symbol table? a. Array b. Stack c. Queue d. Hash table Solution: d
Which data structure is used to sort elements in a sequence? a. Array b. Stack c. Queue d. Heap Solution: d
Which data structure is used to store and access elements based on a key-value pair? a. Array b. Stack c. Queue d. Dictionary Solution: d
Subjective Short Notes
Midterm & Finalterm Prepration
Past papers included
Download PDF
What is a data structure? Answer: A data structure is a way of organizing and storing data in a computer memory so that it can be accessed and manipulated efficiently.
What is the difference between an array and a linked list? Answer: An array is a fixed-size data structure that stores elements in contiguous memory locations, while a linked list is a dynamic data structure that stores elements in nodes, with each node pointing to the next one.
What is a stack? Answer: A stack is a data structure that follows the "last-in-first-out" (LIFO) principle, where the last element added is the first one to be removed.
What is a queue? Answer: A queue is a data structure that follows the "first-in-first-out" (FIFO) principle, where the first element added is the first one to be removed.
What is a tree? Answer: A tree is a hierarchical data structure that consists of nodes connected by edges, with one node at the top called the root node.
What is a graph? Answer: A graph is a non-linear data structure that consists of nodes connected by edges, where the edges may be directed or undirected.
What is a hash table? Answer: A hash table is a data structure that uses a hash function to map keys to their corresponding values, allowing for efficient insertion, deletion, and retrieval operations.
What is a binary search tree? Answer: A binary search tree is a binary tree where the left subtree of each node contains only elements smaller than the node, and the right subtree contains only elements larger than the node.
What is a heap? Answer: A heap is a binary tree where each parent node has a value that is greater than or equal to (for a max heap) or less than or equal to (for a min heap) its children.
What is a priority queue? Answer: A priority queue is a data structure that stores elements with associated priorities, where elements with higher priorities are dequeued first.