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

Data Structures and Algorithms

Rating
-
Sold
-
Pages
5
Grade
A+
Uploaded on
13-06-2025
Written in
2024/2025

Data Structures and Algorithms

Institution
Graduation In Computer Science
Course
Graduation in computer science









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

Written for

Institution
Graduation in computer science
Course
Graduation in computer science

Document information

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

Subjects

Content preview

COSC 2336 Test 2

Which of the following is NOT an operation that can be performed on a stack: - Correct
Answers-Insert

When working with a stack, peek removes the value from the top of the stack. - Correct
Answers-False

A stack is a first-in, first-out data structure. - Correct Answers-False

Stacks are used by compilers to implement recursion. - Correct Answers-True

Stacks can be implemented only using arrays. - Correct Answers-False

Which of the following would result in an error? - Correct Answers-Popping an empty stack

When implementing a stack as a linked-list, you must make sure the stack isn't full before you
can push a new item onto it. - Correct Answers-False

Which of the following would not be a good use of a stack: - Correct Answers-Keyboard buffer

Which of the following is true of implementing a stack using a linked list: - Correct Answers-The
next reference for the bottom of the stack is null

Which of the following is true of an array-based stack implementation: - Correct Answers-
Requires an IsFull method to check for a full stack

A reference-based stack makes more efficient use of memory. - Correct Answers-True

Queues are FIFO (first in, first out) data structures. - Correct Answers-True

If 5 items are added to a queue, the first item to be removed from the queue is the first item
that was added to the queue. - Correct Answers-True

Operations on a queue can be carried out at ______. - Correct Answers-both its front and back

A reference-based implementation of a queue that uses a linear singly linked list would need at
least ______ external references.

, three - Correct Answers-two

Which of the following is the code to insert a new node, referenced by newNode, into an empty
queue represented by a circular linked list? - Correct Answers-newNode.setNext(newNode);
lastNode = newNode;

Which of the following code fragments is used to delete the item at the front of a queue
represented by a circular array? - Correct Answers-front = (front+1) % MAX_QUEUE;
--count;

Which of the following operations inserts an element at the end of the queue: - Correct
Answers-enqueue

Which of the following is NOT an ADT queue operation: - Correct Answers-push

When implementing a queue using a reference-based approach, the operation dequeueAll is
not needed - Correct Answers-False

When implementing a queue using an array-based approach, it is not necessary to determine if
the queue if full before adding a new item to the queue - Correct Answers-False

A queue can be used as a keyboard buffer. - Correct Answers-True

Queues are rarely used in simulation programs. - Correct Answers-False

Which of the following is NOT a means of implementing a queue: - Correct Answers-Circularly
linked list
linearly linked list
linear array
circular array

All of these can be used to implement a queue

How many external references are necessary when implementing a queue using a circularly-
linked list? - Correct Answers-1

When implementing a queue, a naive array approach is more efficient in terms of memory
when compared to a circular array approach. - Correct Answers-False

A referenced-based queue implementation uses a statically allocated linked-list. - Correct
$11.99
Get access to the full document:

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

Get to know the seller
Seller avatar
phil3

Also available in package deal

Thumbnail
Package deal
DATA STRUCTURES AND ALGORITHMS 2025
-
7 2025
$ 83.93 More info

Get to know the seller

Seller avatar
phil3 stuvia
View profile
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
6 months
Number of followers
0
Documents
222
Last sold
-
A+ QuickPass exam packs.

Get real nursing exam questions with certified answers. Perfect for quick revision and exam prep. Clear, accurate and easy to use. Package deals also available with 50 % offer. Study smart, pass fast!

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

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