This** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*
This** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*
This** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*
This** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*
This** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*
This** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*
This** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*
This** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*
This** preview**
has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*
**Unformatted text preview: **Question 1 Which is NOT correct for the Linked list data Structure? Selected Answer: C. There are more than one ﬁrst nodes Question 15 0.5 out or 0.5 points There are two common techniques used to implement an iterator class. One technique deﬁnes the class inside the data structure class and the iterator object is a public data member
of the data structure class other technique deﬁnes the class oulside the data structure class and iterator object is declared in the client
code Selected Answer: True
Wednesday, April 8, 2015 4:13:13 PM CDT Question 9 0.75 out of 0.75 points The linked list structure is Selected A.
Answer: The data structure that can rapidly apand to accommodate a virtually unlimited number of nodes, one node at a time Question 5 The following is operation of the singly linked list
Selected Answer: A. Fetch, Insert, Delete, Update Question 4 The process of moving from the ﬁrst node to the second node to the third node, etc. by u:
the link ﬁelds to locate the next node is called Selected Answer: B. Traversing Question 9 The Double Ended Singly Linked list is Selected B.
Answer: A singly linked list in which in which insertions are permitted at the front
Question 7 A. Create a new linked list Node object B. Place the address of the new linked list Node object into the next ﬁeld of the dummy n:
C. Add the new linked list Node object to the beginning of the linked list D. Deep copy the client’s information, reference the copy Which following combination are steps of the Insert Algorithm of the Singly Linked List da‘ Selected Answer: c, ACBD Question 10 A. Set the trailing reference Node q to refer to the dummy node B. Set Node p pointing to the ﬁrst linked node (after the dummy node) C. Traverse the list until get the node matched the key, make q trail p throughout the trave
D. If node p is not null, jump over the delete node then return true, if it is null, return false Which of the following combination containing steps of the Delete algorithm of Singly Link: Selected Answer: B. ABCD Question 11 0.5 In the doubly linked list data structure, there is only one way to move from one node to the no:
using the ﬁeld next, cannot go back to the node before it. Selected Answer: False Question 12 0 out We can Insert a node to the front or the rear of the double ended singly linked list data structure Selected Answer: False Question 13 0.5 out The algorithm of Insert operation of the Sorted Singly Linked List is after inserting a node after dur
then the linked list will sort the list to place the node at the right location. Selected Answer: False Question 14 0.5 out of 0. The singly linked list has the header node and the rear node
Selected Answer: False Question 15 0.5 out of 0. There are two common techniques used to implement an iterator class. One technique deﬁnes the class inside the data structure class and the iterator object is a public data r
of the data structure class other technique deﬁnes the class outside the data structure class and iterator object is declared in the
oode Selected Answer: True Question 1 0.75 out of 0.75 points The process of moving from the ﬁrst node to the second node to the third node, etc. by using the contenls of
the link ﬁelds to locate the next node is called Selected Answer: B. Traversing Question 2 0.75 out of 0.75 points The most fundamental category of noncontiguous data structure is
Selected Answer: D. Linked List Question 3 0 out of 0.75 points The doubly linked list is Selected C.
Answer: A singly linked list in which in which insertions are permitted at the front and rear of the list
Question 4 0 out of 0.75 points Which is NOT correct for the singly linked list? Selected Answer: C. There is a unique ﬁrst node ni and last node nj Question 5 0.75 out of 0.75 points A. Set the trailing reference Node q to refer to the dummy node B. Set Node p pointing to the ﬁrst linked node (after the dummy node) C. Traverse the list until get the node matched the key, make q trail p throughout the traverse
D. If node p is not null, jump over the delete node then return true, if it is null, return false Which of the following combination containing steps of the Delete algorithm of Singly Linked List? Selected Answer: B. ABCD Question 6 Which is NOT correct for the Linked list data Structure? Selected Answer: C. There are more than one ﬁrst nodes Question 10 0 out of 0.75 The circular singly linked list is Selected D.
Answer: A singly list in which each node in the list has an additional linked reference ﬁeld that refer
the node just before it in the list Question 11 0.5 out of 0.5 The last node in a singly linked list, by deﬁnition, it store the address of a node on the list
Selected Answer: False Question 12 0 out of 0.5 In the circular singly linked list, one node can move to the node before it by using the ﬁeld previous tha
to the previous node Selected Answer: True zuestion 13 0.5 out of 0.5 The singly linked list has the header node and the rear node
Selected Answer: False Question 14 0.5 out of 0.5 pl Iterator class provides methods for positioning the iterator object at the ﬁrst item in the list Selected Answer: True Question 15 0.5 out of 0.5 pl In the doubly linked list data structure, there is only one way to move from one node to the node after it l
using the ﬁeld next, cannot go back to the node before it. Selected Answer: False
Wednesday, April 8, 2015 4:33:29 PM CDT Question 8 There are several types of linked lists but all of them share two common characteristic
following are the correct common characteristics: 1.Every node in the sturcture has at least one ﬁeld, called a link ﬁeld, that stores the
(with the exception of the unique last node,, if there is one) 2.Every node in the structure has at least one ﬁeld, called index that stores the locatii
structure. 3.Each node in the structure has at least one ﬁeld, called size that stores the length 0
4.Each node’s location is sotred in at least one other node (with the exception of the i
there is one) Selected Answer: c, 1 and 4 Question 5 ip = h(k) = k where k is the given key What is the name of the function? Selected Answer: B. Direct Hashing Function Question 6 Which one is NOT correct with Hashing access algorithms Selected Answer: D. The Hashing access algorithm uses the node number to access data 5 Question 7 Comparing Sequential Search algorithm, the hashing algorithms are Selected Answer: A. Fast Question 8 LQHashed has the following operation(s):
Selected Answer: D. all of above Question 9 Pseudo key is
Selected Answer: D. All of above Question 10 The average speed of Direct Hashed Data Structure is
Selected Answer: A. 0(1) Question 11
In the non-perfect hashed structure, the search length is the number of memory access ft the node
Selected Answer: True Question 12
Fold Shifting Preprocessing Algorithm divides the key ﬁeld into groups of bits, with the siz: being the desired size of the pseudo key
Selected Answer: True Question 13 Loading factor is referred to as the maximum loading factor
Selected Answer: True Question 14 The iterator object is used in the linear list such that the object retains its position in the |
operation is performed. This will help to speed up the update process of the list by n time: Selected Answer: True Question 15 0 out of 0.5 points
Non-perfect hashing algorithm is an algorithm that provides a unique location in the primary storage area for
each key
Selected Answer: True Question 7 Hashing access function ip = h(k). Which one of the following is NOT correct: Selected Answer: A. it is used to compute the max size of the primary storage area Question 1 The pseudo key is computed from the Subtraction Preprocessing algorithm is Selected Answer: D. all of above Question 2 A. Access the primary storage area by running preprocessing method
B. Delete the node at ip
C. Assign value of index ip by pseudo key The following are steps of Direct Hashed Delete Algorithm ___ Selected Answer: B. ACB Question 3 The speed of LQHashed is ___
Selected Answer: A. 0(1) Question 4 Hashing access function ip = h(k). Which one of the following is NOT correct: Selected Answer: A. it is used to compute the max size of the primary storage area Question 12 0 out oi Loading factor is referred to as the maximum loading factor
Selected Answer: True Question 15 0.5 om Pseudorandom Average Preprocessing is a technique used to distribute keys somewhat randomly .'
primary storage area array Selected Answer: True
Wednesday, April 8, 2015 4:53:51 PM CDT Question 5 Preprocessing algorithm is:
Selected Answer: c, a and [3 Question 6 Which one is true for Perfect Hashing algorithms? Selected Answer: C. a and b are correct Question 7 LQHashed has the following operation(s):
Selected Answer: D. a" of above Question 8 A. Access the primary storage area by running preprocessing method
B. Assign value of index ip by pseudo key
C. Return a copy of the node or a null reference The following are the steps of Direct Hashed Fetch Algorithm Selected Answer: B. ACB Question 14 LQHashed Data Structure has the key that has to be a integer number.
Selected Answer: False Question 15 0.75 out of 0.75 0.75 out of 0.75 0.75 out of 0.75 0 out of 0.75 0.5 out of 0 0.5 out of 0 In the non-perfect hashed structure, the search length is the number of memory access required to [01 the node
Selected Answer: True
Wednesday, April 8, 2015 5:02:45 PM CDT Question 1 0.75 out of 0.75 points To set up the table for a party, if we use n tables and set up one next another as the picture. How
many seats are there when if one side of the table can place only one chair? When determine Four-Step Methodology for developing recursive algorithm to write a recursive
function named as calculateSeat(int n) what is the base case for this problem? Selected Answer: B. n = 1; 5eat=4 Question 9 0.75 out of 0.75 [ Hashing access function ip = h(k). Which one of the following is NOT correct: Selected Answer: A. it is used to compute the max size of the primary storage area Question 10 0.75 out of 0.75 ; Which one is NOT correct for collision and collision algorithm? Selected Answer: c. Collision algorithms increase the speed of access Question 11 0.5 out of 0.5; The hashing accesses function ip = h(k) is the Division hasing function that is used to compute a locatior
into the primary storage area
Selected Answer: False Question 12 0.5 out of 0.5; Fold Shifting Preprocessing Algorithm divides the key ﬁeld into groups of bits, with the size of each group
being the desired size of the pseudo key Selected Answer: True Question 13 0.5 out of 0.5; The iterator object is used in the linear list such that the object retains ils position in the list after an
operation is performed. This will help to speed up the update process of the list by n times Selected Answer: True Question 1 0.75 out of ip = h(k) = k mod N = k °/a N where N is the number of storage location allocated of the primary:
area What is the name of the function? Selected Answer: A. Division Hashing Function Question 2 0.75 out of Pseudo key is Selected Answer: D. All of above Question 3 0.75 out of A. Access the primary storage area by running preprocessing method
B. Delete the node at ip
C. Assign value of index ip by pseudo key The following are steps of Direct Hashed Delete Algorithm _ Selected Answer: B. ACB QUEStiON 4 0.75 out of The speed of LQHashed is _
Selected Answer: A. 0(1) Question 3 0.75 out of 0.75 points To set up the table for a party, if we use n tables and set up one next another as the picture. How many
seats are there when if one side of the table can place only one chair? When determine Four-Step Methodology for developing recursive algorithm to write a recursive function
named as calculateSeat(int n) What is the reduce problem? Seiected Answer: A. calculateSeat(n-1) Question 4 0.75 out of 0.75 points wrectly Recursive algorithm Selected Answer: A. 5 One when it implements a recursive algorithm, it invokes itself Question 4 0.75 out of 0.75 points Iarty, they have the tables that have the shape with 6 sides, each side has one seat. If they connect these tables, one
next others, we have these table set up as the above picture. If we apply the recursion to write the Java method named
calculateSeat(n), what is the general solution? 1 1 1 1 1 1
. 0:: ~01
1 a: 1 1 1
Selected Answer: 5_ calculateSeat(n-l) + 4 Question 5 0.75 out of 0.75 points To set up the table for a party, if we use n tables and set up one next another as the picture. How many seats
are there when if one side of the table can place only one chair? When determine Four-Step Methodology for developing recursive algorithm to write a recursive function
named as calculateSeat(int n) What is the general solution? Selected Answer: c. calculateSeat(n-l) + 2 Question 1 0.75 out of 0.75 points The menu of Juan’s Taco Tower states “when ordering a Sombrero Meal you get a taco, and a soda, and your
choice of an ice cream sundae or a Sombrero Meal" Which of the following is the acceptable order? Selected Answer: B. E taco, 2 soda and 1 ice cream sundae Question 2 0.75 out of 0.75 points There is a sequence of letter a, b and c as follows: acbacbacb... If we know the sequence n-1 letters, we
can write the letter at location n easily. What are the letters at location 117 118 and 119? Selected Answer: 5, bac Question 3 0.75 out of 0.75 points When we apply recursive algorithm to the Fibonacci sequence the base case is: Selected Answer: B. f1 = 1 and f2 = 1 Question 5 0.75 out of 0.75 points There is a series of numbers as follows: 0, 1, 6, 11, 16, 21, 26, 31,
To prepare the recursion algorithm to write the method named ”valueA ” to tell the value ofthe number at n position, What is the base case? Selected Answer: D. both b and c Question 6 0.75 out of 0.75 points There is a series of numbers as follows:
0, 1, 2, 4, 8, 16, 32, 64,
To prepare the recursion algorithm to write the method named ”valueAt” to tell the value ofthe number at n What is the reduce problem? Selected Answer: A. valueAt (n-1) Question 9 0.75 out of 0.75 points There is a series of numbers as follows:
0, 1, 2, 4, 8, 15, 32, 54, ......
To prepare the recursion algorithm to write the method named ”valueAt” to tell the value ofthe number at n position. What is the base case? Selected Answer: c, both a and b Question 10 0 out of 0.75 points The base case; reduce problem and general solution of the recursive algorithm of n! are: Selected Answer: A. 0! =0 (n-1)! n(n-1)! Question 3 0 out of 0.75 points The base case; reduce problem and general solution of the recursive algorithm of n! are: Selected Answer: C. 0! =0 (n-l)! n(n-1) Question 4 0.75 out of 0.75 points The menu of Juan's Taoo Tower states “when ordering a Sombrero Meal you get a taco,
and a soda, and your choice of an ice cream sundae or a Sombrero Meal" What is the part of the Sombrero Meal’s description is recursive? Selected Answer: D. Choice of a Sombrero Meal Question 5 0.75 out of 0.75 points There is a sequence of letter a, b and c as follows: acbacbacb... If we know the sequence n-1 letters, we
can write the letter at location n easily. What are the letters at location 117 118 and 119? Selected Answer: (3, bac Question 12 0.5 out of 0.5 points The recursive methods often call themselves at many times and each time it calls a lower level of
recursion, a new stack frame is built. Therefore, recursive method runs slowly and consumes memory. At the worst case, the programs that invoke recursive methods run unacceptably slowly can terminate in
a run-time "Stack Overﬂow" error. Selected Answer: True Question 13 0.5 out of 0.5 points public void messageo { System.out.println(“This is a message"); messageO; } The above method message is an example of direct recursion since it calls itself directly Selected Answer: False Question 14 0.5 out of 0.5 points All algorithms can be stated recursively
Selected Answer: False Question 6 0.75 out of 0.75 points There is a series of numbers as follows: 0, 1, 6, 11, 16, 21, 26, 31,
To prepare the recursion algorithm to write the method named "valueAt" to tell the value ofthe number at n position, What is the base case? Selected Answer: D. both b and c Question 7 0.75 out of 0.75 points The menu of Juan's Taco Tower states “when ordering a Sombrero Meal you get a taco,
and a soda, and your choice of an ice cream sundae or a Sombrero Meal" What is the part of the Sombrero Meal's description is recursive? Selected Answer: D, Choice of a Sombrero Meal Question 10 0.75 out of 0.75 points The menu ofJuan's Taco Tower states "when ordering a Sombrero Meal you get a taco, and a soda, and
your choice of an ice cream sundae or a Sombrero Meal” What is the base case (escape clause) in the description of a Sombrero Meal? Selected Answer: c. Choice of an ice cream Question 11 0.5 out of0.5 points Reverse a String s of length n can be written by using recursive algorithm
Selected Answer: True Question 7 0.75 out of 0.75 points Four steps in the methodized approach to formulating a recursive algorithm Selected D.
Answer: Determine base case, determine the reduced problem determine general solution, combine all these steps to form the recursive algorithm Question 11 0.5 out of 0.5 points ecursive algorithms must have an escape clause Selected Answer: True Question 12 0 out of 0.5 points public void message() { System.out.println(“This is a message"); message(); } The above method message is an example of direct recursion since it calls itself directly Selected Answer: True Question 13 0.5 out of 0.5 points The recursive methods often call themselves at many times and each time it calls a lower level of
recursion, a new stack frame is built. Therefore, recursive method runs slowly and consumes memory. At the worst case, the programs that invoke recursive methods run unacceptably slowly can terminate in
a run-time "Stack Overﬂow" error. Selected Answer: True Question 14 0 out of 0.5 points All algorithms can be stated recursively
Selected Answer: True Question 15 0.5 out of 0.5 points Reverse a String s of length n can be written by using recursive algorithm
Selected Answer: True
Wednesday, April 8, 2015 5:18:44 PM CDT ...

View
Full Document

- Spring '16
- Recursion, hash function