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

Module 4: NUR 2214 Module 4 :EA Questions & Answers

Rating
4.0
(1)
Sold
-
Pages
13
Grade
A+
Uploaded on
30-11-2024
Written in
2024/2025

Module 4: NUR 2214 Module 4 :EA Questions & Answers

Institution
Course









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

Connected book

Written for

Course

Document information

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

Subjects

Content preview

Module 4: NUR 2214 Module 4 :EA Questions & Answers

A class is defined to represent each list item, known as a ____ - ANSWER:list node

A linked list has what key advantage over a sequential storage approach like an array or ArrayList? -
ANSWER:An item can be inserted somewhere in the middle

What's the purpose of a list's head node? - ANSWER:Provides a reference to the first item's node in the
list, if it exists.

A stack is often implemented using a linked list, with the list's head node being the stack's _____ -
ANSWER:top

Assume the stack is implemented using a linked list. An empty stack is indicated by a list head pointer
value of _____ - ANSWER:null

True or False: StackPop points a local variable to the list's head node. - ANSWER:True

Assume the queue is implemented using a linked list. If the head pointer is null, the queue____ -
ANSWER:is empty

For the operation QueuePop(queue), what is the second parameter passed to ListRemove after? -
ANSWER:0

For the operation QueuePop(queue), poppedItem contains a pointer to the _____. - ANSWER:list head

Queues and ____ are similar in that they are data structures that are designed for a temporarily holding
data. - ANSWER:Stacks

While you can us an array to create a queue, it turns out that ____ are much more suitable. -
ANSWER:Linear Nodes

Linked nodes have this advantage over arrays for implementing collections: - ANSWER:no capacity issues

Because a linear node holds a reference to a generic object, we call it a: - ANSWER:container

Which of the following is/are required to build up a linear node class? - ANSWER:- Getter/Setter for next
node

- Default Constructor

- Getter/Setter for element

- Constructor with element or parameters

- Getter/Setter for previous node (Double linked node only)

- Implementation of generics

There are two types of liner nodes: - ANSWER:singly-linked and doubly-linked

, Assume you have a linked list data structure with f nodes. It is a singly-linked list that supports generics,
so it can hold any type of object. How many reference are in this data structure, including references
that are null? - ANSWER:2f+1

Assume you have a stack implemented with single-linked nodes, that looks like this:



282 -> 789 -> 93 -> 261 -> 89



'top' is a reference variable that points to the node containing 282, and 'count' is an internal int that
holds the count of nodes (currently 5).



If you want to do push operation with the value 275, what is the pseudocode to achieve this? -
ANSWER:1. create single linked node called temp

2. set temp's element pointer to 275

3. set temp's next pointer to be the same as top

4. set top to point at temp

5. increment count

True or False: The top variable keeps track of the number of elements in a LinkedStack implementation -
ANSWER:False

What is the benefit of implementing a stack with a linked linear node structure, as opposed to an array?
- ANSWER:You won't run out of capacity like with an array, and have to create and copy a whole new
structure.

Assume you have a stack, called myStack, implemented with single-linked nodes, that looks like this:



m -> k -> e -> y



'top' is a reference variable that points to the node containing m, and 'count' is an internal int that holds
the count of nodes (currently 4).



The following code is ran:



Character firstPop =

myStack.pop();
$18.49
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached


Also available in package deal

Reviews from verified buyers

Showing all reviews
11 months ago

4.0

1 reviews

5
0
4
1
3
0
2
0
1
0
Trustworthy reviews on Stuvia

All reviews are made by real Stuvia users after verified purchases.

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.
TEACHME3 Teachme2-tutor
Follow You need to be logged in order to follow users or courses
Sold
7
Member since
1 year
Number of followers
0
Documents
499
Last sold
7 months ago
TEACH ME 2

Welcome to TestBanksGuru, your go-to source for high-quality test banks and study materials designed to help you excel academically. We offer a comprehensive range of resources including test banks, study guides, solution manuals, and other study materials, all meticulously curated to ensure accuracy and effectiveness. Our affordable, instantly accessible materials are complemented by excellent customer support, making your learning experience seamless and efficient. Trust Testbanksguru to be your partner in academic success, providing the tools you need to achieve your educational goals.

Read more Read less
4.2

419 reviews

5
210
4
126
3
56
2
19
1
8

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