Exam 10: Algorithm Efficiency and Sorting
Exam 1: Review of Java Fundamentals60 Questions
Exam 2: Principles of Programming and Software Engineering60 Questions
Exam 3: Recursion: the Mirrors60 Questions
Exam 4: Data Abstraction: The Walls60 Questions
Exam 5: Linked Lists60 Questions
Exam 6: Problem Solving With Abstract Data Types60 Questions
Exam 7: Stacks60 Questions
Exam 8: Queues60 Questions
Exam 9: Advanced Java Topics60 Questions
Exam 10: Algorithm Efficiency and Sorting60 Questions
Exam 11: Trees60 Questions
Exam 12: Tables and Priority Queues60 Questions
Exam 13: Advanced Implementations of Tables60 Questions
Exam 14: Graphs60 Questions
Exam 15: External Methods30 Questions
Select questions type
An algorithm's time requirements can be derived as a function of the problem size.
Free
(True/False)
4.9/5
(37)
Correct Answer:
True
Suppose we wish to sort an array of 3-digit integers using radix sort.We will make three passes over the elements of the array.What occurs during the first pass?
Free
(Short Answer)
4.9/5
(48)
Correct Answer:
The elements are sorted according to their 1's (rightmost)digit.
In the worst case,how many comparisons are required in the bubble sort?
Free
(Essay)
4.8/5
(34)
Correct Answer:
In the worst case,the bubble sort requires n * (n - 1)/2 comparisons.
The value of which of the following growth-rate functions grows the slowest?
(Multiple Choice)
4.9/5
(36)
The recursive binary search algorithm is a logarithmic algorithm.
(True/False)
4.9/5
(37)
If a problem of size n requires time that is directly proportional to n,the problem is ______.
(Multiple Choice)
4.9/5
(36)
Assuming a linked list of n nodes,the code fragment: Node curr = head;
While (curr != null){
System.out.println(curr.getItem());
Curr.setNext(curr.getNext());
} // end while
Requires ______ write operations.
(Multiple Choice)
4.8/5
(37)
An algorithm's execution time is related to the number of ______ it requires.
(Multiple Choice)
4.8/5
(42)
For large arrays,the insertion sort is prohibitively inefficient.
(True/False)
4.8/5
(35)
Which of the following is NOT part of the human cost of developing a computer program?
(Multiple Choice)
4.8/5
(38)
Each merge step of the mergesort requires ______ major operations.
(Multiple Choice)
4.9/5
(42)
Showing 1 - 20 of 60
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)