Data Structures Exam 2

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

___ is when more and more new keys would likely be hashed to the array slots that are already occupied.

CLUSTERING

Sequential and binary search algorithms are called ____ search algorithms

COMPARISON-BASED

The function ____ makes an identical copy of a stack.

COPYSTACK

Computer simulations are particularly useful for simple systems where it is easy to construct a mathematical model

. FALSE

Elements are added at one end of the queue, called the ____ or rear

BACK

If the queue is nonempty, the operation ____ returns the last element of the queue and so the element of the queue indicated by the pointer queueRear is returned.

BACK

The ____ operation on a queue returns the last element in the queue, but does not remove the element from the queue.

BACK

To remove, or pop, an element from the stack ____

DECREMENT STACKTOP BY 1

The queue operation ____ removes the front element from the queue

DELETEQUEUE

The binary search algorithm uses the ____ technique to search the list.

DIVIDE-AND-CONQUER

If the queue is nonempty, the operation top returns the first element of the queue.

FALSE

Prior to the addQueue operation, the queue must exist and must not be empty.

FALSE

Prior to the deleteQueue operation, the queue must exist and must not be full

FALSE

The best and worst cases are likely to occur most of the time that we apply the sequential search on a list

FALSE

The bottom element of the stack is the last element added to the stack.

FALSE

The front of the queue is accessed whenever a new element is added to the queue

FALSE

The function members of the class describe the properties of the objects, and the class variables describe the actions on that data

FALSE

The general rule to process elements in a queue is that the customer at the end of the queue is served next and that when a new customer arrives, he or she stands at the front of the queue.

FALSE

The operation pop returns the top element of the stack.

FALSE

The operation top removes the top element of the stack.

FALSE

To successfully implement a stack, we need at least seven operations.

FALSE

You cannot write a recursive algorithm to implement a sequential search algorithm

FALSE

Elements are deleted from the end of the queue called the ____.

FRONT

In hashing, the data is organized with the help of a table, called the ___

HASH TABLE

The operation ____ reinitializes the stack to an empty state

INITIALIZESTACK

The ____ operation checks whether the stack is empty

ISEMPTYSTACK

The queue operation ____ determines whether the queue is full

ISFULLQUEUE

The ____ operation checks whether the stack is full.

ISFULLSTACK

The unique member of an item is called the ____ of the item

KEY

A stack is a ____ data structure

LIFO

The sequential search is also called a ____ search.

LINEAR

In ____, we assume that the array is circular so that if the lower portion of the array is full, we can continue the search in the top portion of the array

LINEAR PROBING

The stack is empty if stackTop is ____.

NULL

In ____, the data is stored within the hash table.

OPEN ADDRESSING

A binary search can be performed only on ____.

ORDERED LISTS

Linear probing causes clustering that is called ____

PIMARY CLUSTERING

The ____ operation on a queue removes the next element in the queue.

POP

The operation ____ is used to remove the top element from the stack.

POP

In a ____, customers or jobs with higher priority are pushed to the front of the queue

PRIORITY QUEUE

When we check the array locations t, (t + 1) % HTSize, (t + 2) % HTSize, . . ., (t + j) % HTSize it is called the____ of the hash table.

PROBE SEQUENCE

The ____ operation on a queue inserts a copy of item into the queue

PUSH(ITEM)

A ____ is a set of elements of the same type in which the elements are added at one end.

QUEUE

Whenever a system is modeled on the First In First Out principle, ____ are used.

QUEUES

The addition and deletion of elements occurs only at one end of a stack, called the ____ of the stack

TOP

We can perform the operation ____ to retrieve the top element of the stack.

TOP

A list is ordered if its elements are ordered according to some criteria

TRUE

A printer acts as the server when a queue of documents is waiting to be printed.

TRUE

A stack is called a LIFO data structure

TRUE

An array is a random access data structure; a stack is not.

TRUE

An element can be removed from the stack only if there is something in the stack, and an element can be added to the stack only if there is room

TRUE

Because a queue is an important data structure, the Standard Template Library (STL) provides a class to implement queues in a program

TRUE

Because the size of the array to store queue elements is fixed, only a finite number of queue elements can be stored in the array.

TRUE

From the binary search algorithm, it follows that every iteration of the while loop cuts the size of the search list by half

TRUE

If we compare the push function of the stack with the insertFirst function for general lists, we see that the algorithms to implement these operations are similar.

TRUE

In linear probing, starting at location t, we search the array sequentially to find the next available array slot

TRUE

Open addressing can be implemented in several ways.

TRUE

The analysis of algorithms enables programmers to decide which algorithm to use for a specific application.

TRUE

The computer uses a stack to implement function calls

TRUE

The front of the queue is accessed whenever an element is deleted from the queue.

TRUE

The function copyStack makes a copy of a stack

TRUE

The notion of a queue in computer science is the same as the notion of the queues to which you are accustomed in everyday life.

TRUE

The queue is empty if queueFront is NULL

TRUE

The use of a queue structure ensures that the items are processed in the order they are received.

TRUE

When analyzing a search algorithm, we count the number of key comparisons because this number gives us the most useful information

TRUE

When performing a sequential search, we assume all list elements are equally likely to be the target

TRUE


Set pelajaran terkait

ENV 122 CH8 Environmental Health and Toxicology

View Set

Chapter 8. Introduction to MySQL

View Set

251 Marketing Week One Practice Questions

View Set