Question
Question 1 (1 point) What is the output of the following function if called with the argument doFun2(7)? function doFun2(n) { // Enqueue is equivalent
Question 1 (1 point)
What is the output of the following function if called with the argument doFun2(7)? function doFun2(n) { // Enqueue is equivalent to push, Dequeue is equivalent to shift var q = []; q.push(0); q.push(1); for (var i = 0; i
Question 1 options:
Save
Question 2 (1 point)
A Stack is used when data is transferred asynchronously between two processes.
Question 2 options:
1) True | |
2) False |
Save
Question 3 (1 point)
How many queues are needed to implement a Stack
Question 3 options:
| |||
| |||
| |||
|
Save
Question 4 (1 point)
In the most efficient implementation of a Queue what is best case time efficiency of the Dequeue operation
Question 4 options:
| |||
| |||
|
Save
Question 5 (1 point)
What is the output of the following function if called with the argument doFun2(15)? function doFun2(n) { // Enqueue is equivalent to push, Dequeue is equivalent to shift var q = []; q.push(0); q.push(1); for (var i = 0; i
Question 5 options:
Save
Question 6 (1 point)
Linked Lists must have the size of the list determined on declaration of the list.
Question 6 options:
1) True | |
2) False |
Save
Question 7 (1 point)
You are given pointers to first and last nodes of a singly linked list, which of the following operations are dependent on the length of the linked list?
Question 7 options:
| |||
| |||
| |||
|
Save
Question 8 (1 point)
What is the value of t after the following code; var a = []; var s = "COP3530";var t = ""; for (var i = 0; i
Question 8 options:
Save
Question 9 (1 point)
A traditional use of the Stack data structure is evaluation of arithmentidc expressions
Question 9 options:
1) True | |
2) False |
Save
Question 10 (1 point)
What will be the output of the following code? var a = ["3", "2", "1"]; document.getElementById("demo").innerHTML = a.sort();
Question 10 options:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started