Data Structures and Algorithms – Multiple Choice Questions (MCQs)
-
-
2. Which data structure follows the Last-In, First-Out (LIFO) principle?
-
3. Which data structure follows the First-In, First-Out (FIFO) principle?
-
4. What is the time complexity of accessing an element in an array by its index?
-
5. What is the time complexity of searching for an element in an unsorted array?
-
6. What is the time complexity of searching for an element in a sorted array using binary search?
-
7. What is a linked list?
-
8. What is the time complexity of inserting an element at the beginning of a singly linked list?
-
9. What is the time complexity of inserting an element at the beginning of a doubly linked list?
-
10. What is a stack?
-
11. The operation of adding an element to a stack is called:
-
12. The operation of removing an element from a stack is called: