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

Data Structure Exam 2 Solved Correctly To Score A+!!!!

Rating
-
Sold
-
Pages
27
Grade
A+
Uploaded on
30-07-2025
Written in
2024/2025

Data Structure Exam 2 Solved Correctly To Score A+!!!!

Institution
Data Structures
Course
Data Structures

Content preview

Data Structure Exam 2 Solved
Correctly To Score A+!!!!
1. How is the order of the entries of an ADT list determined?

a) by the list itself

b) by the client

c) by the operating system

d) the order doesn't matter CORRECT ANSWERS B.

2. Which element of the list does not have a unique predecessor?

a) the head of the list

b) the tail of the list

c) the middle element of the list

d) all have unique predecessors CORRECT ANSWERS A.

3. Changing the value of an entry at a given position on the list would probably be the
task of which of these

methods?

a) replace

b) get

c) push

d) insert CORRECT ANSWERS A.

# What type would the getLength method for a list return?

a) boolean

b) ItemType

c) integer

,d) void CORRECT ANSWERS C

4. Which of the following list methods would have only one parameter?

a) isEmpty

b) setEntry

c) insert

d) remove CORRECT ANSWERS D

5. Which of the following methods from list would have no parameters and void for the
return type?

a) setEntry

b) getEntry

c) insert

d) clear CORRECT ANSWERS D.

6. Given bList: snibble, nibble, tribble, wibble, quibble. The command

bList.insert(3, Bob) is executed. What is the appearance of the list?

a) snibble, nibble, tribble, Bob, wibble, quibble

b) snibble, nibble, Bob, tribble, wibble, quibble

c) snibble, nibble, tribble, wibble, quibble, Bob, Bob, Bob

d) Bob, Bob, Bob, snibble, nibble, tribble, wibble, quibble CORRECT ANSWERS B.

7. Given bList: bob, slob, snob, cob, hob, rob and the operation bList.remove(4) is

executed. What does the list become?

a) bob, slob, snob, hob, rob

b) bob, slob, snob, cob, rob

c) bob, slob

d) hob, rob CORRECT ANSWERS A.

, 8. Given cList: bip, snip, pip, rip, dip, clip. What value would be returned by the call to

method cList.getEntry(3)?

a) bip

b) snip

c) pip

d) rip CORRECT ANSWERS C.

9. Given cList: bip, snip, pip, rip, dip, clip. What value would be returned by the call to

method cList.insert(9, sip)?

a) true

b) false

c) it throws an exception

d) sip CORRECT ANSWERS B.

10. What should be returned by the list operation (aList.insert(2,x)).getEntry(2) ?

a) false

b) 2

c) x

d) an exception is thrown CORRECT ANSWERS C.

11. What would be returned by the list operation (bList.insert(3,x)).remove(3)?

a) 2

b) x

c) false

d) bList CORRECT ANSWERS D.

Written for

Institution
Data Structures
Course
Data Structures

Document information

Uploaded on
July 30, 2025
Number of pages
27
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$18.49
Get access to the full document:

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

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.
ElevatedExcellence Exam
Follow You need to be logged in order to follow users or courses
Sold
924
Member since
3 year
Number of followers
504
Documents
18336
Last sold
10 hours ago
GETSOCIO EDUCATION

We have launched our assignments at a very reasonable price so that every student can enjoy its features. Our new method is gathering quite a positive feedback from the students, and many of our alumnus are fully satisfied with it. We would be glad if you purchase from us. THANK YOU!!

3.8

175 reviews

5
79
4
36
3
29
2
10
1
21

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

Working on your references?

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

Working on your references?

Frequently asked questions