100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

IS 122 Programming Logic (HU) Midterms Exam Review 2025 (Qns & Ans)

Rating
-
Sold
-
Pages
28
Uploaded on
13-03-2025
Written in
2024/2025

IS 122 Programming Logic (HU) Midterms Exam Review 2025 (Qns & Ans)IS 122 Programming Logic (HU) Midterms Exam Review 2025 (Qns & Ans)IS 122 Programming Logic (HU) Midterms Exam Review 2025 (Qns & Ans)











Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
March 13, 2025
Number of pages
28
Written in
2024/2025
Type
Exam (elaborations)
Contains
Unknown

Subjects

Content preview

IS 122

Programming Logic

Midterms Exam Review (Qns & Ans)

2025



1. Which of the following data structures is most efficient for
implementing a recursive depth-first search algorithm?
A. Queue
B. Stack
C. Hash Table
D. Array
- ANS: B. Stack
- Rationale: Depth-first search relies on the Last-In-First-Out
(LIFO) principle, making a stack the most suitable data structure.


©2025

,2. What is the primary benefit of using modular programming in
software design?
A. Reduces program execution time
B. Simplifies debugging and code maintenance
C. Increases code redundancy
D. Avoids the use of libraries
- ANS: B. Simplifies debugging and code maintenance
- Rationale: Modular programming divides code into reusable
and manageable parts, facilitating debugging and updates.


3. In a binary search algorithm, what condition must the input
array meet for the algorithm to function correctly?
A. The array must be unsorted.
B. The array must contain no duplicate elements.
C. The array must be sorted.
D. The array must have a fixed size.
- ANS: C. The array must be sorted.
- Rationale: Binary search works by dividing the array into
halves, a process that only works with sorted data.


4. Which programming construct is used to ensure mutual
exclusion in multithreaded programming?
©2025

, A. Loop
B. Semaphore
C. Array
D. Function
- ANS: B. Semaphore
- Rationale: Semaphores regulate access to shared resources
to prevent race conditions in multithreading.


5. What is the time complexity of the merge sort algorithm in the
worst case?
A. \( O(n^2) \)
B. \( O(n \log n) \)
C. \( O(n) \)
D. \( O(\log n) \)
- ANS: B. \( O(n \log n) \)
- Rationale: Merge sort divides the data into smaller subsets
and sorts them, achieving a logarithmic divide-and-conquer
efficiency.


---


Fill-in-the-Blank Questions
©2025

Get to know the seller

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.
Examiner651 Freelance
View profile
Follow You need to be logged in order to follow users or courses
Sold
17
Member since
3 year
Number of followers
5
Documents
3731
Last sold
5 months ago

5.0

2 reviews

5
2
4
0
3
0
2
0
1
0

Recently viewed by you

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

Frequently asked questions