Exam 3: Searching, Sorting, and Complexity Analysis
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
All algorithms that perform the same task take the same amount of time to complete.
Free
(True/False)
4.7/5
(36)
Correct Answer:
False
The number of Python instructions executed in an algorithm will differ from the number of machine language instructions executed.
Free
(True/False)
4.8/5
(30)
Correct Answer:
True
Why is the efficiency of algorithms desirable?
Free
(Multiple Choice)
4.8/5
(43)
Correct Answer:
A
An algorithm that uses the exact same Python code run on two different machines should have the same performance data.
(True/False)
4.9/5
(36)
How can the following algorithm be described?
Position = 0
While position < len(lyst):
If target == lyst[ position ]:
Return position
Position += 1
Return -1
(Multiple Choice)
4.8/5
(35)
What term best describes the following code?
X = myList[ i ]
MyList[ i ] = myList[ j ]
MyList[ j ] = x
(Multiple Choice)
4.8/5
(34)
The merge sort employs a recursive, divide-and-conquer strategy to break the O( n2 ) barrier.
(True/False)
4.8/5
(39)
The amount of work of a logarithmic algorithm is proportional to the log2 of the problem size.
(True/False)
4.8/5
(35)
Which of the following is a common way to measure the time cost of an algorithm?
(Multiple Choice)
4.8/5
(29)
In a bubble sort, each pass through the main loop selects a single item to be moved.
(True/False)
4.8/5
(39)
Python's in operator is implemented as a method named __contains__ in the list class.
(True/False)
4.8/5
(38)
How can an algorithm be described in which the work it does grows as a function of the square of the problem size?
(Multiple Choice)
5.0/5
(37)
The first two numbers in the Fibonacci sequence are 1s, and each number after that is the sum of the previous two numbers.
(True/False)
4.8/5
(42)
Showing 1 - 20 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)