Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 4 out of 53 pages
Exam (elaborations)

CSCI Final Exam: 200 Comprehensive Multiple-Choice Questions with Verified Answers & Detailed Rationales (Rated A+) Latest Update 2026/2027

Document preview thumbnail
Preview 4 out of 53 pages

Ace your computer science final exam with this comprehensive 2026/2027 study guide featuring 200 exam-style questions and complete answers with detailed rationales. Covering every core CSCI topic: data structures (stacks, queues, trees, hash tables), algorithms (sorting, searching, graph algorithms, dynamic programming), programming languages (Python, Java, C++, JavaScript), operating systems (processes, scheduling, memory management, deadlock), computer architecture, databases (SQL, normalization, transactions), computer networks (OSI, TCP/IP, HTTP, DHCP), theory of computation (automata, Turing machines, undecidability), software engineering (Agile, testing, Git), and more. Perfect for final exam review, placement tests, and technical interviews. Each question includes clear rationales to reinforce core concepts. Boost your CS knowledge and pass with confidence.

Content preview

CSCI Final Exam: 200 Comprehensive
Multiple-Choice Questions with Verified Answers &
Detailed Rationales (Rated A+) Latest Update
2026/2027

Section 1: Data Structures & Abstract Data Types

1. Which data structure is most appropriate for implementing an undo feature in
a text editor?
A) Queue
B) Stack
C) Priority Queue
D) Hash Table
Correct Answer: B) Stack
Rationale: Undo requires LIFO (Last In, First Out) behavior – the most recent
operation is undone first.
2. In a circular queue implemented with an array, the condition for a full queue
(using front and rear pointers) is:
A) front == rear
B) (rear + 1) % size == front
C) rear == size – 1
D) front == (rear + 1) % size
Correct Answer: B) (rear + 1) % size == front
Rationale: To distinguish between full and empty, one slot is left unused; full
occurs when the next rear position wraps to front.
3. What is the worst-case time complexity for searching an element in a balanced
binary search tree (BST) of n nodes?
A) O(1)
B) O(log n)
C) O(n)
D) O(n log n)




1

,Correct Answer: B) O(log n)
Rationale: In a balanced BST (e.g., AVL or Red-Black tree), height is O(log n), so
search takes O(log n) worst case.
4. Which data structure uses FIFO (First In, First Out) order?
A) Stack
B) Queue
C) Array
D) Linked List
Correct Answer: B) Queue
Rationale: A queue follows FIFO – the first element inserted is the first to be
removed.
5. A priority queue is typically implemented using which underlying data
structure?
A) Stack
B) Linked List
C) Heap
D) Hash Table
Correct Answer: C) Heap
Rationale: Heaps provide O(log n) insertion and O(log n) removal of the highest
(or lowest) priority element.
6. What is the primary disadvantage of a singly linked list compared to an array?
A) More memory per element
B) No random access
C) Slower insertion at head
D) Cannot store heterogeneous data
Correct Answer: B) No random access
Rationale: Singly linked lists require O(n) time to access the i-th element, whereas
arrays provide O(1) random access.
7. In a doubly linked list, deletion of a given node (with a pointer to that node)
takes:
A) O(1) time
B) O(log n) time


2

,C) O(n) time
D) O(n log n) time
Correct Answer: A) O(1) time
Rationale: With a pointer to the node, you can update its predecessor’s next
pointer and its successor’s prev pointer in constant time.
8. A hash table with separate chaining has a load factor α. The average time for an
unsuccessful search is:
A) O(1)
B) O(α)
C) O(log α)
D) O(n)
Correct Answer: B) O(α)
Rationale: Unsuccessful search examines the entire chain; average chain length is
α = n / table_size.
9. Which tree traversal visits the root first, then the left subtree, then the right
subtree?
A) Inorder
B) Preorder
C) Postorder
D) Level-order
Correct Answer: B) Preorder
Rationale: Preorder follows Root → Left → Right.
10. A complete binary tree with 7 nodes has how many leaf nodes?
A) 3
B) 4
C) 5
D) 6
Correct Answer: B) 4
Rationale: In a complete binary tree, leaves are at the last level; for 7 nodes,
levels 1,2,3; leaves = 4 (nodes 4,5,6,7 in array representation).




3

, Section 2: Algorithms & Complexity
11. What is the time complexity of binary search on a sorted array of size n?
A) O(1)
B) O(log n)
C) O(n)
D) O(n log n)
Correct Answer: B) O(log n)
Rationale: Each step halves the search space, leading to log₂(n) comparisons.
12. Which sorting algorithm has the best worst-case time complexity?
A) Bubble Sort
B) Quick Sort
C) Merge Sort
D) Insertion Sort
Correct Answer: C) Merge Sort
Rationale: Merge sort guarantees O(n log n) even in worst case; quicksort can
degrade to O(n²).
13. The worst-case time complexity of quicksort occurs when:
A) The pivot is the median element
B) The array is already sorted and the pivot is the first element
C) The array contains all equal elements
D) The array size is a power of two
Correct Answer: B) The array is already sorted and the pivot is the first element
Rationale: This produces the most unbalanced partitions (size 0 and n-1), leading
to O(n²).
14. Which of the following is NOT a stable sorting algorithm?
A) Merge Sort
B) Bubble Sort
C) Quick Sort (typical in-place implementation)
D) Insertion Sort




4

Document information

Uploaded on
June 15, 2026
Number of pages
53
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$24.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
PrepMaster
4.8
(310)
Sold
289
Followers
18
Items
2806
Last sold
9 hours ago


Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions