Java TOPIC 28 – DATA
STRUCTURE QUIZ REVIEW SOLUTIONS REVIEW SOLUTIONS (FOR QUESTION 1)
b) The
traditional method used to add an element to a stack is called
_______________ (although Java also supports the add method.). c) In Java, the
method used to get and remove an element from a queue is called _______________.
Traditionally, it is often called dequeue. d) The method
used to get and remove an element from a stack is called _______________. e) FIFO
refers to ____________ ___________ ____________ ____________. It is the same as LILO. f) FILO
refers to ____________ ___________ ____________ ____________. It is the same as LIFO. g)
_______________ is the type of data structure that is FIFO. h)
_______________ is the type of data structure that is FILO. i) ____________ is a data structure
where all elements are stored together sequentially in memory. This structure cannot be resized. j) A(n)
____________ is a linear data structure that stores elements in different
nodes. Each node is stored in a
different location in memory. This
structure can be resized efficiently. k) A(n)
______________ is like a normal array but with the ability of being
resized. It could be implemented using
an array or a linked list. l) A data
structure that allows you to add and remove elements only at the one end of
it is called _____________. m) A data
structure that allows you to add elements at one end and get/remove from the
other end is called _______________. n) A data
structure's efficiency is measured by both the ______________ and the
_______________ to manipulate the structure. time required p) Java
_________________ is the framework that contains many different
implementations of data structures including lists, sets and maps. q) With
regards to Data Structures, ADT stands for _______________ ________________
________________. r) A(n)
__________________ is a data structure that stores both a key and value. The
key is used to access the value. It is
also called an associative array. t) Java
implementations of Map ADTs include ________________ and _______________. u) Java
implementations of Set ADTs include ________________ and ________________. v) The
enhanced for loop can be used with data structures that implement the
____________ interface. y) Both the
Stack and Queue implementations that we looked at have a __________ method
that allows you to see the element that could be popped or polled next but
doesn’t actually remove the element from the structure. peek QUESTION 2 - 6 |
|
|