Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Answer True or False to the following problems. A constructor is implicitly call

ID: 3573673 • Letter: A

Question

Answer True or False to the following problems. A constructor is implicitly called when a class object is declared. Quick sort should NOT use when the data is almost sorted. A heap must be a full binary tree. Merge sort requires extra space. Selection sort recognizes if the values are already sorted. Binary searching is always faster than linear searching. HeapSort is inherently unstable. A priority queue can be designed to function as a FIFO queue. A priority queue can be designed to function as a stack. Insertion order determines the shape of a binary search tree. A binary search tree does not need a copy constructor. Deleting a node in a binary tree always reduces the number of levels in the tree.

Explanation / Answer

1. True

Constructor in java is a special type of method that is used to initialize the object. Java constructor is invoked at the time of object creation. It constructs the values i.e. provides data for the object that is why it is known as constructor.

2. True

performance degrades to O(n2) when the array is already sorted as well as when the array has all equal elements.

3. True

4. True Merge sort does not do sorting in place. Merge sort first divides the array into equal halves and then combines them in a sorted manner.

5. False

6. True

7. True

8. True

9. True

10. True

11. True

12. False

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote