0% found this document useful (0 votes)
4 views5 pages

Filtered Exam Questions

The document contains final exam questions for a course on Data Structures and Algorithms, focusing on multiple-choice questions related to various concepts such as postfix expressions, stack operations, queue conditions, linked lists, hash tables, sorting algorithms, and searching algorithms. Each question tests the understanding of fundamental principles and complexities associated with data structures and algorithms. Students are reminded of the submission format and the consequences of copying answers.

Uploaded by

cuong25mc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views5 pages

Filtered Exam Questions

The document contains final exam questions for a course on Data Structures and Algorithms, focusing on multiple-choice questions related to various concepts such as postfix expressions, stack operations, queue conditions, linked lists, hash tables, sorting algorithms, and searching algorithms. Each question tests the understanding of fundamental principles and complexities associated with data structures and algorithms. Students are reminded of the submission format and the consequences of copying answers.

Uploaded by

cuong25mc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

FINAL EXAM QUESTIONS: Data

Structures and Algorithms


0.
Wrong submission format, score 0,
Copy each other's result, score 0 for all.

Part I: Multi-choice questions (4 points)

1) Which of the following is a valid postfix expression for the infix expression "A + B * ("2

A. ABC#+
B. AB+C*
C. A+BC*
D. A*B+C

2) Which operation on a stack results in an element being added to the top of the stack?

A. Pop

B. Push

C. Enqueue
D. Dequeue

3) The stack data structure follows which principle?

A. FIFO (First In First Out)


B. LIFO (Last In First Out)
C. LILO (Last In Last Out)
D. FILO (First In Last Out)

4) What is the condition for a circular queue to be full when implemented using arrays?

A. (front + 1) % size == rear :


B. (rear + 1) % size = front ; ="
C. rear == front wosn
D, front = rear + 1

5) Which of the following operations cannot be performed in O(1) time ona queue? — d
A. Enqueue Tis

B, Dequeue om dpe
C. Peek cane eA Rees f,

€ text book,

ote: Students are allowed to use th

6) A priority queue is typically implemented using which data structure?

A. Stack

- Linked List
Heap
. Binary Search Tree

Dn a circular linked list, the last node points to:

The first node


- The second node
C. A null reference
D. Itself

8) Which type of linked list allows traversal in both directions?

A. Singly Linked List


@®)Doubly Linked List
C. Circular Linked List
D. Self-Referential List

9) Which of the following statements about linked lists is false?

. Linked lists are dynamic in size.

Linked lists have a fixed size.


< Insertion and deletion Operations are faster in linked lists compared to arrays,
inked lists do not allow random access,

10) What is a common disadvantage of the chaining method for collision Tesolution in hash
tables?

(Vnreased memory usage


Limited table size

C. Complexity of implementation
D. Higher average-case time complexity for search Operations

11) Which hashing method involves using a hash function to Compute the initial address
and then using
another function to resolve collisions?

A. Chaining

B. Linear Probing

C. Quadratic Probing
(Double Hashing

12) What is the typical load factor threshold for resizing a hash table?

Note: Students are allowed to use the text book.

ee eee ee =

0.5

0.7

- 1.0

13) What is the average-case time complexity of quicksort?

. O(n)
JO@ log n)
- O02)

D. O(log n)

14) Which algorithm has a space complexity of O(1) for its in-place sorting process?

A. Merge Sort
B. Heap Sort
Quick Sort
- Insertion Sort

15)-What does the big-O notation describe in algorithm analysis?

A. The exact time an algorithm takes

The worst-case scenario time complexity


C. The average-case scenario time complexity
D. The best-case scenario time complexity

16) Which sorting algorithm divides the array into a sorted and an unsorted region, then
iteratively
inserts elements from the unsorted region into the sorted region?

A. Bubble Sort
Insertion Sort
- Quick Sort
D. Merge Sort

17) Which sorting algorithm is not based on the comparison model?

A. Merge Sort
. Radix Sort

| | - Quick Sort

| | D. Heap Sort
18) What is the time complexity of the heap sort algorithm?

\. O(n)

3) O(n log n)
C. O(m2)
D. O(log n)

se tS SSS St arenes
ote: Students are allowed to use the text book. ;

——

19) Which searching algorithm works efficiently with a sorted and uniformly distributed
array?

A. Linear Search

B. Binary Search

C. Jump Search
(Dy Interpolation Search

20) What is the time complexity of searching for an element in a balanced binary search tree
(BST)?

A.O(1)

. O(n)
© O(log n)
. O(a log n)

You might also like