I need need help with these questions for programming 1 . The head of the list d
ID: 3566481 • Letter: I
Question
I need need help with these questions for programming
1. The head of the list does not contain any elements, just a pointer.
True or False
2.The stack is LILO.
True or False
3.An if statement is recursive.
True or False
4.The sort key is the value used to sort a collection of elements
True or False
5. In the Grey code List.add() will do what?
a. Add an element to the start of the list(element 0)
b. Add a collection of elements
c. All of these
6. When we add to the stack we are said to be:
a. Adding
b. Popping
c. Stacking
d. Pushing
7. Queue.dequeue() does what?
a. Queue.dequeue() does what?
b. Removes the front element in the queue so long as the queue is not empty
c. Removes all elements in the queue, regardless of the number of elements in the list.
d. Add a int length to the queue
8. Recursion is always a tradeoff of:
a. Time and Space
b. Code and Non-code
c. Time and Energy
d. All of these
9. A list is a _____________ collection of elements.
10. The back button on a browser is a good example of the use of a __________ by going to the last address loaded into it.
11. A queue can attach the head and tail of an array in a __________ array, making the management of front and rear of the queue different because the rear can be a lower position then the front.
12. The _______________ case stops a recursive statement.
13. ________________ sort knows which element to insert into the sorted part, but it doesn
Explanation / Answer
1. True
2.False
3.False
4.False
5.a. Add an element to the start of the list(element 0)
6.d. Pushing
7.b. Removes the front element in the queue so long as the queue is not empty
8.a. Time and Space
9. A list is a _Dynamic_ collection of elements.
10.The back button on a browser is a good example of the use of a Browserhistory(cache memory)_ by going to the last address loaded into it.
11.A queue can attach the head and tail of an array in a Dynamic array, making the management of front and rear of the queue different because the rear can be a lower position then the front.
12.The f-else statement case stops a recursive statement.
13. Insertion sort knows which element to insert into the sorted part, but it doesn