If the numbers 23, 5, 11, 17 are inserted, in that order in a stack, which will
ID: 3645702 • Letter: I
Question
If the numbers 23, 5, 11, 17 are inserted, in that order in a stack, which will be the first element to be removed?A.23
B.17
C.5
D.11
The Big-Oh asymptotic notation is used to express the ____.
A.number of execution errors of a program
B. number of logical errors of a program
C.complexity or running time of an algorithm
D. number of lines of a program
A linked list consists of ____.
A. a collection of nodes with a pointer or reference to the next node.
B. a collection of nodes with a data member.
C. a collection of nodes with a pointer.
D.a collection of nodes with both a data member and a pointer or reference to the next node.
If the numbers 9, 17, 21, 34 are inserted, in that order in a queue, which will be the first element to be removed? ____ .
A. 9
B. 17
C. 21
D. 34
A doubly linked list ____
A.consists of a set of nodes where each node only contains a data value
B.consists of a set of nodes where each node contains a data value, and a pointer or reference to the previous node in the list
C.consists of a set of nodes where each node contains a data value, and a pointer or reference to the next node in the list
D.consists of a set of nodes where each node contains a data value, a pointer or reference to the previous node in the list, and a pointer or reference to the next node in the list
Which of the following functions has a constant growth rate?
n
n2
n log n
1
The running time (or order of complexity) for a sequential search of a linked list with n nodes is ____.
O(1)
O(log n)
O(n)
O(n2)
Explanation / Answer
1.If the numbers 23, 5, 11, 17 are inserted, in that order in a stack, which will be the first element to be removed? ans: B.17 (Last In First Out ) 2. The Big-Oh asymptotic notation is used to express the ____. ans: C.complexity or running time of an algorithm 3. A linked list consists of ____. ans: D.a collection of nodes with both a data member and a pointer or reference to the next node. 4. If the numbers 9, 17, 21, 34 are inserted, in that order in a queue, which will be the first element to be removed? ____ . ans; A. 9 (First In First Out) 5. A doubly linked list ____ ans: D.consists of a set of nodes where each node contains a data value, a pointer or reference to the previous node in the list, and a pointer or reference to the next node in the list 6. Which of the following functions has a constant growth rate? ans: n (If a function is O(n) we call it linear) 7. The running time (or order of complexity) for a sequential search of a linked list with n nodes is ____. ans: O(n)