1. What algorithm is used to calculate the shortest path between two vertices im a graph? Select the correct Options: A. Breadth First Search B. Depth First Search C. Dijkstra's shortest path algorithm D. All of the above 2. long foo (long n, P long r) if (n > 0): return (n * r++ #2 == 0 ? foo(n / r + 1, r + 1) : foo(n * (r + 1), r)) else: return 0 What is the r value in the 10th recursive call of function foo(123456, 2)? (Obviously r is 2 in the first call) a) 15
PLEASE SUBMIT THE CORRECT OPTION IF YOU DON'T KNOW THE CORRECT OPTION SKIP THE QUESTION, IF YOU GIVE THE INCORRECT SOLUTION I WILL DOWNVOTE IT AND GIVE SOLUTION TO ALL THE QUESTION DO NOT FORGET ANY QUESTION...THANKS!
1. What
A. Breadth First Search
B. Depth First Search
C. Dijkstra's shortest path algorithm
D. All of the above
2. long foo (long n, P long r)
if (n > 0):
return (n * r++ #2 == 0 ? foo(n / r + 1, r + 1) : foo(n * (r + 1), r))
else:
return 0
What is the r value in the 10th recursive call of function foo(123456, 2)? (Obviously r is 2 in the first call)
a) 15
b) recursion ends before 15th recursive call
c)10
d)16
3. What is the cost-benefit analysis (CBA) of implementing a firewall that costs $5,000 and has a 90% effectiveness in mitigating a semi-annual threat, which results in an incident cost of $1,000 per occurrence? Select the correct options: A. 3200
B. -3200
C. 3210
D. None of the above
4. Which one of the following correct options:
A. Lifecycle methods will not run when a component is modified and altered.
B. Lifecycle methods in react JS is for the entire project rather than for each component.
C. React contained both controlled and uncontrolled components.
D. A and C.
5. Alice uses a digital signature(DS) to communicate with Bob for authentication and integrity. Bob claims to have received a message in clear text, "Transfer $1432 to Peter," with a valid digital signature from Alice. Alice denies sending the message. The digital signature proves that Alice must have created the message. Select the correct Option:
A. True
B. False
6. What will be the return value of function call foo (n, n) for the following recursive function foo ()? Assume that the variable n is initialized to 4 before function call.
int foo(int& p, int q) {
int I = 9;
I = g - 1;
if (q == 0)
return 1;
p = p + 1;
return foo(p, q) * p;
}
Select the correct option:
A. 44
B. 343
C. 24
D. 434
7.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps