Filters
Question type

Study Flashcards

The run-time complexities of the operations on a doubly linked structure are typically double compared to the corresponding operations on the singly linked structure.

A) True
B) False

Correct Answer

verifed

verified

What are almost all operations on arrays based upon?


A) hashes
B) keys
C) links
D) indexes

E) All of the above
F) C) and D)

Correct Answer

verifed

verified

What type of linked structure operation is the following code performing? Z = 0 Probe = head While probe != None: Z = probe.data + z Probe = probe.next


A) traversal
B) initialization
C) visit with removal
D) insertion

E) A) and C)
F) B) and C)

Correct Answer

verifed

verified

Older programming languages implement arrays as static data structures which are inefficient. What do modern languages use to remedy the problems of static arrays?


A) dynamic arrays
B) linked lists
C) data stacks
D) hash tables

E) A) and B)
F) A) and D)

Correct Answer

verifed

verified

The following code searches a linked structure. What is the missing code? Probe = head While probe != None and targetItem != probe.data: < missing code > If probe != None: Print("Target item found!") Else: Print("Target item not found!")


A) probe.data = next.data
B) probe.next = targetItem.data
C) probe = probe.next
D) probe.head = probe.next

E) All of the above
F) A) and B)

Correct Answer

verifed

verified

Why are the insertion and removal of the first node special cases of the insert and remove i th node on singly linked structures?


A) the tail pointer must be reset
B) the first item must be deleted
C) the head pointer must be reset
D) the last item must be deleted

E) None of the above
F) C) and D)

Correct Answer

verifed

verified

If the logical size of an array equals the physical size of the array, a new array must be created to add elements to the array.

A) True
B) False

Correct Answer

verifed

verified

The operation of removing an item at the end of a linked structure is constant in time and memory.

A) True
B) False

Correct Answer

verifed

verified

The first item in a singly linked structure is accessed using a head link.

A) True
B) False

Correct Answer

verifed

verified

A traversal of a singly linked structure terminates when the temporary variable is equal to the head pointer.

A) True
B) False

Correct Answer

verifed

verified

Which of the following statements accesses the second column in the third row of a two-dimensional array?


A) twoDim[ 2 ][ 1 ]
B) twoDim[ 4 ][ 3 ]
C) twoDim[ 1 ][ 2 ]
D) twoDim[ 2 ][ 3 ]

E) All of the above
F) A) and B)

Correct Answer

verifed

verified

How does a programmer access the first item in a singly linked structure?


A) by using the 0 index
B) with the first() method
C) by following a head link
D) by a call to getLink(1)

E) B) and D)
F) B) and C)

Correct Answer

verifed

verified

A circular linked structure contains a link from the last node back to the first node in the structure.

A) True
B) False

Correct Answer

verifed

verified

Which of the following best describes an array?


A) a collection of data points that represent an object
B) a list of values that are indexes to a database
C) a numeric value that points to a position in RAM where data can be found
D) a sequence of items that can be accessed at given index positions

E) A) and D)
F) A) and B)

Correct Answer

verifed

verified

When an item is inserted into an array, the logical size of the array increases.

A) True
B) False

Correct Answer

verifed

verified

It's easier to get to an item's predecessor in a singly linked structure than in a doubly linked structure.

A) True
B) False

Correct Answer

verifed

verified

What is the primary implementing structure of Python collections?


A) list
B) array
C) linked list
D) dictionary

E) All of the above
F) C) and D)

Correct Answer

verifed

verified

When a list's append method results in memory wasted beyond a threshold, the size of the underlying array is decreased.

A) True
B) False

Correct Answer

verifed

verified

To access a two-dimensional array, you use two subscripts.

A) True
B) False

Correct Answer

verifed

verified

Which of the following is true about Python's array module?


A) it is limited to storing numbers
B) it behaves much like a dictionary
C) it can only hold character values
D) you can define its size at run time

E) C) and D)
F) B) and C)

Correct Answer

verifed

verified

Showing 21 - 40 of 50

Related Exams

Show Answer