Deck 15: Linked Data Structures

ملء الشاشة (f)
exit full mode
سؤال
A node contains:
(a)data item(s)
(b)reference(s)to another node
(c)both A and B
(d)none of the above
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Making the Node class a private inner class of a linked data structure is an example of:
(a)polymorphism
(b)encapsulation
(c)inheritance
(d)all of the above
سؤال
Recursively visiting the root node,left subtree and then the right subtree describes:
(a)preorder processing
(b)inorder processing
(c)postorder processing
(d)none of the above
سؤال
Java contains a mechanism that automatically reclaims memory.This mechanism is called:
(a)Garbage elimination
(b)Garbage collection
(c)Taking out the trash
(d)None of the above
سؤال
To use the Java Iterator Interface you must import the ____________ package.
(a)java.tools
(b)java.linkedlist
(c)java.iterator
(d)java.util
سؤال
The _________ node is the first node in the tree data structure.
(a)leaf
(b)root
(c)sibling
(d)branch
سؤال
A ____________ linked list has nodes that contain two references to Nodes.
(a)circular
(b)sequential
(c)doubly
(d)one-way
سؤال
If the head instance variable of a linked list contains a reference to null,this means the list is:
(a)full
(b)empty
(c)lost
(d)none of the above
سؤال
A common exception that occurs when using linked lists is the:
(a)NodeOutOfBoundsException
(b)NodeEmptyException
(c)NullPointerException
(d)NullNodeOccurredException
سؤال
A _________________ maps a data value such as a String into a number:
(a)recursive function
(b)key function
(c)hash function
(d)none of the above
سؤال
When using a linked list,you do not need to know when the end of the list has been reached.
سؤال
A binary tree has exactly _________ link instance variables.
(a)zero
(b)one
(c)two
(d)three
سؤال
Java does not come with a LinkedList library class.
سؤال
A ____________ copy of an object is a copy that has no references in common with the original object.
(a)bit copy
(b)deep copy
(c)shallow copy
(d)none of the above
سؤال
In Java,a node is a/an:
(a)String
(b)Integer
(c)Object
(d)Exception
سؤال
The first node in a linked list is commonly referred to as the ________ node.
(a)head
(b)tail
(c)predecessor
(d)successor
سؤال
A _____________ copy of an object is a copy that has references in common with the original object.
(a)bit copy
(b)deep copy
(c)shallow copy
(d)none of the above
سؤال
A linked data structure contains nodes and links.
سؤال
In Java,you indicate the end of a linked list be setting the link instance variable of the last node in the linked list to __________.
(a)0
(b)-1
(c)1
(d)null
سؤال
Recursively visiting the left subtree,right subtree and then the root describes:
(a)preordering processing
(b)inorder processing
(c)postorder processing
(d)none of the above
سؤال
Linked lists introduce the possibility of a privacy leak occurring.
سؤال
An iterator is any object that allows you to step through the list one item at a time.
سؤال
Create a generic Node class to represent the linked list depicted in your diagrams above.
سؤال
What is the function of the variable head when used with a linked list? What is the data type of the head variable?
سؤال
Given the Node class created in number 6 above,write Java statements to insert a new node containing (Chattanooga,23.7)into an empty list.
سؤال
A deep copy of an object is a copy that has references in common with the original object.
سؤال
A copy constructor and a clone method should normally make a deep copy whenever possible.
سؤال
If you define a clone method,the class should implement the Cloneable interface.
سؤال
A queue is a last-in/first-out structure.
سؤال
Redraw the diagram created in number 3 above,after deleting the node containing Chicago.
سؤال
Write a method called displayList that displays the data items in the Node class created in number 6 above.
سؤال
What is the result of a preorder traversal of the binary search tree created in question 12 above?
سؤال
A stack cannot be represented as a linked list.
سؤال
Forgetting to set the reference instance variable of the last node in a linked list to null will cause a logic error.
سؤال
Redraw the diagram created in number 4 above after deleting the head node.
سؤال
What is the binary search tree storage rule?
سؤال
Draw the resulting binary search tree inserting the following values in the given order: 7,10,5,12,1,3,9.
سؤال
Given the Node class created in number 6 above,write Java statements to delete a node from the beginning of the list.
سؤال
Draw a diagram of a linked list that contains nodes with data items of type String that contains the name of a city and type double that contains a pollution index.Include an instance variable named head to indicate the beginning of the list.Insert the following nodes: Franklin,15.7,Chicago,23.2,Denver,7.2.
سؤال
Redraw the diagram created in number 2 above after inserting a node containing Chattanooga,27.6.
سؤال
What is the result of an inorder traversal of the binary search tree created in question 12 above?
سؤال
Discuss the differences between a queue and a stack.
سؤال
What is the result of a postorder traversal of the binary search tree created in question 12 above?
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/43
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 15: Linked Data Structures
1
A node contains:
(a)data item(s)
(b)reference(s)to another node
(c)both A and B
(d)none of the above
C
2
Making the Node class a private inner class of a linked data structure is an example of:
(a)polymorphism
(b)encapsulation
(c)inheritance
(d)all of the above
B
3
Recursively visiting the root node,left subtree and then the right subtree describes:
(a)preorder processing
(b)inorder processing
(c)postorder processing
(d)none of the above
A
4
Java contains a mechanism that automatically reclaims memory.This mechanism is called:
(a)Garbage elimination
(b)Garbage collection
(c)Taking out the trash
(d)None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
5
To use the Java Iterator Interface you must import the ____________ package.
(a)java.tools
(b)java.linkedlist
(c)java.iterator
(d)java.util
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
6
The _________ node is the first node in the tree data structure.
(a)leaf
(b)root
(c)sibling
(d)branch
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
7
A ____________ linked list has nodes that contain two references to Nodes.
(a)circular
(b)sequential
(c)doubly
(d)one-way
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
8
If the head instance variable of a linked list contains a reference to null,this means the list is:
(a)full
(b)empty
(c)lost
(d)none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
9
A common exception that occurs when using linked lists is the:
(a)NodeOutOfBoundsException
(b)NodeEmptyException
(c)NullPointerException
(d)NullNodeOccurredException
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
10
A _________________ maps a data value such as a String into a number:
(a)recursive function
(b)key function
(c)hash function
(d)none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
11
When using a linked list,you do not need to know when the end of the list has been reached.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
12
A binary tree has exactly _________ link instance variables.
(a)zero
(b)one
(c)two
(d)three
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
13
Java does not come with a LinkedList library class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
14
A ____________ copy of an object is a copy that has no references in common with the original object.
(a)bit copy
(b)deep copy
(c)shallow copy
(d)none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
15
In Java,a node is a/an:
(a)String
(b)Integer
(c)Object
(d)Exception
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
16
The first node in a linked list is commonly referred to as the ________ node.
(a)head
(b)tail
(c)predecessor
(d)successor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
17
A _____________ copy of an object is a copy that has references in common with the original object.
(a)bit copy
(b)deep copy
(c)shallow copy
(d)none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
18
A linked data structure contains nodes and links.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
19
In Java,you indicate the end of a linked list be setting the link instance variable of the last node in the linked list to __________.
(a)0
(b)-1
(c)1
(d)null
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
20
Recursively visiting the left subtree,right subtree and then the root describes:
(a)preordering processing
(b)inorder processing
(c)postorder processing
(d)none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
21
Linked lists introduce the possibility of a privacy leak occurring.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
22
An iterator is any object that allows you to step through the list one item at a time.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
23
Create a generic Node class to represent the linked list depicted in your diagrams above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
24
What is the function of the variable head when used with a linked list? What is the data type of the head variable?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
25
Given the Node class created in number 6 above,write Java statements to insert a new node containing (Chattanooga,23.7)into an empty list.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
26
A deep copy of an object is a copy that has references in common with the original object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
27
A copy constructor and a clone method should normally make a deep copy whenever possible.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
28
If you define a clone method,the class should implement the Cloneable interface.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
29
A queue is a last-in/first-out structure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
30
Redraw the diagram created in number 3 above,after deleting the node containing Chicago.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
31
Write a method called displayList that displays the data items in the Node class created in number 6 above.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
32
What is the result of a preorder traversal of the binary search tree created in question 12 above?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
33
A stack cannot be represented as a linked list.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
34
Forgetting to set the reference instance variable of the last node in a linked list to null will cause a logic error.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
35
Redraw the diagram created in number 4 above after deleting the head node.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
36
What is the binary search tree storage rule?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
37
Draw the resulting binary search tree inserting the following values in the given order: 7,10,5,12,1,3,9.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
38
Given the Node class created in number 6 above,write Java statements to delete a node from the beginning of the list.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
39
Draw a diagram of a linked list that contains nodes with data items of type String that contains the name of a city and type double that contains a pollution index.Include an instance variable named head to indicate the beginning of the list.Insert the following nodes: Franklin,15.7,Chicago,23.2,Denver,7.2.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
40
Redraw the diagram created in number 2 above after inserting a node containing Chattanooga,27.6.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
41
What is the result of an inorder traversal of the binary search tree created in question 12 above?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
42
Discuss the differences between a queue and a stack.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
43
What is the result of a postorder traversal of the binary search tree created in question 12 above?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 43 في هذه المجموعة.