Exam 4: Arrays and Linked Structures
Exam 1: Basic Python Programming51 Questions
Exam 2: An Overview of Collections50 Questions
Exam 3: Searching, Sorting, and Complexity Analysis50 Questions
Exam 4: Arrays and Linked Structures50 Questions
Exam 5: Interfaces, Implementations, and Polymorphism50 Questions
Exam 6: Inheritance and Abstract Classes50 Questions
Exam 7: Stacks50 Questions
Exam 8: Queues50 Questions
Exam 9: Lists50 Questions
Exam 10: Trees50 Questions
Exam 11: Sets and Dictionaries50 Questions
Exam 12: Graphs50 Questions
Select questions type
The process for resizing an array named myArray is shown below. What is the missing code? if logicalSize == len(myArray):
Temp = Array(len(myArray) + 1)
For i in range(logicalSize):
< missing code >
A = temp
Free
(Multiple Choice)
4.9/5
(38)
Correct Answer:
B
What method does Python's list type use to increase the size of the underlying array?
Free
(Multiple Choice)
4.9/5
(30)
Correct Answer:
B
What type of memory scheme does a linked list use?
Free
(Multiple Choice)
4.9/5
(41)
Correct Answer:
B
Which statement tests if a singly linked node variable named myItem has been initialized?
(Multiple Choice)
4.8/5
(35)
What is the operation on a linked structure called that visits each node without deleting it?
(Multiple Choice)
4.7/5
(35)
In the Array class defined in Chapter 4, how do you instantiate an array object that can hold 10 values?
(Multiple Choice)
4.8/5
(40)
In Python, a node in a doubly linked structure contains two fields: a data item and a reference to the next node.
(True/False)
4.8/5
(42)
Which of the following is an advantage of a doubly linked structure over a singly linked structure?
(Multiple Choice)
4.9/5
(29)
On a linked structure, index-based operations must be emulated by manipulating links within the structure.
(True/False)
4.8/5
(30)
What type of operation is the following code performing? probe = head
While probe != None and targetItem != probe.data:
Probe = probe.next
If probe != None:
Probe.data = newItem
Return True
Else:
Return False
(Multiple Choice)
4.7/5
(38)
The following code sums all the values in the two-dimensional array. What is the missing code?
Sum = 0
For row in range(grid.getHeight()):
For column in range(grid.getWidth()):
< missing code >
(Multiple Choice)
4.8/5
(40)
The list is the primary implementing structure in Python collections.
(True/False)
4.8/5
(31)
To start a traversal of a linked structure, initialize a variable to the structure's head pointer.
(True/False)
4.8/5
(31)
What process is required to avoid wasting memory if successive calls to the pop method on a list are made?
(Multiple Choice)
4.9/5
(51)
In the following code to insert an item in an array, what is the missing code? for x in range(logicalSize, targetIndex, -1):
MyArray[x] = myArray[x - 1]
A[targetIndex] = newItem
< missing code >
(Multiple Choice)
4.7/5
(41)
A ragged grid has a fixed number of columns and a variable number of rows.
(True/False)
4.9/5
(38)
What action does the following code perform assuming the Node class defined in Chapter 4? head = Node(newItem, head)
(Multiple Choice)
4.8/5
(35)
On average, what is the performance of a sequential search on a singly linked structure?
(Multiple Choice)
4.7/5
(34)
Showing 1 - 20 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)