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

A class Is a blueprint for many objects Represents a specific real-world object.

ID: 3584245 • Letter: A

Question

A class Is a blueprint for many objects Represents a specific real-world object. Will hold specific values in its fields. Specifies the type of a method. In Java, a class specification Creates objects. Requires the keyword new. Creates references. None of the above. Ordered arrays, compared with unordered arrays, are Much quicker at deletion. Quicker at insertion. Quicker to create. Quicker at searching Big O notation tells How the speed of an algorithm relates to the number of items. The running time of an algorithm for a given size data structure. The running time of an algorithm for a given number of items. How the size of a data structure relates to the number of items Suppose you push 10. 20. 30. and 40 onto the stack. Then you pop three items. Which one is left on the stack? 40 10 20 30 Suppose you insert 15, 25, 35. and 45 into a queue. Then you remove three items. Which one is left? 45 35 15 25 Assume that the linked list has at least two Nodes in it. Which of the following instructions will return the second int value in the list return head.info; return head.next.info; return head.next.next.info; return head.next.next.next.info; It is not possible to return the second int value in the list using head. Assume Node temp is currently set equal to head. Which of the following while loops is the best to be used to iterate through each element of a linked list while (head != null) head = temp.getNext(); while (temp != null) temp = temp. getNext(); while (head != null) temp = temp. getNext(); while (head != null) head = head. getNext(); while (temp != null) head = head. getNext(); In the linked list implementation of the queue class, where does the insert method place the new entry on the linked list? At the head At the tail After all other entries that are greater than the new entry. After all other entries that are smaller than the new entry. In the linked list implementation of the stack class, where does the push method place the new entry on the linked list?? At the head At the tail After all other entries that are greater than the new entry. After all other entries that are smaller than the new entry.

Explanation / Answer

1)A

2)C

3)ABCD

4)C

5)B

stack is FILO or LIFO

6)C

queue is FILO

7)B

8)B

Head should not be varied,due to which the list would be lost

9)d

10)c

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