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 72 pages
Exam (elaborations)

CSE 205 COMPLETE TEST BANK QUESTIONS AND VERIFIED CORRECT ANSWERS

Document preview thumbnail
Preview 4 out of 72 pages

CSE 205 COMPLETE TEST BANK QUESTIONS AND VERIFIED CORRECT ANSWERS

Content preview

CSE 205 COMPLETE TEST BANK QUESTIONS
AND VERIFIED CORRECT ANSWERS

●● Which of the following scenarios would cause a
NullPointerException when working with linked lists? (Select all that
apply)


1. Accessing head.data when the list is empty
2. Setting temp.next = null when temp is null.
3. Iterating through the list while checking for null references.
4. Adding a new node without initializing the head.
Answer: 1, 2


●● Given the following declaration: int[] values = {1,3,5,0,2,8,7,2,5,2};
Evaluate the following expression: values[values[5]]
Answer: 5


●● What is the Big O run time complexity for retrieving the value at a
given index in a linked list?


1. O(n) linear
2. O(1) constant

,3. O(log n) logarithmic
4. O(2^n) exponential
5. None of these
Answer: 1


●● What is the Big O run time complexity for retrieving the value at a
given index in a stack?


1. O(n) linear
2. O(1) constant
3. O(log n) logarithmic
4. O(2^n) exponential
5. None of these
Answer: 1


●● What is the Big O run time complexity for removing the first value
in a queue?


1. O(n) linear
2. O(1) constant
3. O(log n) logarithmic
4. O(2^n) exponential
5. None of these

,Answer: 2


●● What is the Big O run time complexity for removing the top value in
a stack?


1. O(n) linear
2. O(1) constant
3. O(log n) logarithmic
4. O(2^n) exponential
5. None of these
Answer: 2


●● Which of the following would have a exponential Big O run-time
complexity?


1. Computing the area of a circle given the radius
2. Determining if two logical statements are equivalent by brute force
3. Finding the phone number in a phone book, given a person's name
4. Deleting a value from an ArrayList
5. none of these
Answer: 2

, ●● Which of the following would have a logarithmic Big O run-time
complexity?


1. Determine if two logical statements are equivalent by brute force
2. Compute the area of a circle given the radius
3. Delete a value from an ArrayList
4. Find the phone number in a phone book, given a person's name
5. none of these
Answer: 4


●● Which of the following run-time complexity orders is best?


1. O(log n) Logarithmic time
2. none of these
3. O(n) Linear time
4. O(2^n) Exponential
Answer: 1


●● Which of the following run-time complexity orders is worst?


1. O(n) Linear time
2. O(log n) Logarithmic time

Document information

Uploaded on
June 28, 2026
Number of pages
72
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
£10.56

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.
FocusFile7
3.9
(24)
Sold
231
Followers
3
Items
60822
Last sold
10 hours ago



Why students choose Stuvia

Created by fellow students, verified by reviews

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

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight 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 smashed 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