Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Answer all questions or points won't be awarded! Thanks! Question 1 (1 point) Given the following 2 functions - what is the value of calling

Answer all questions or points won't be awarded! Thanks!

Question 1 (1 point)

image text in transcribed

Given the following 2 functions - what is the value of calling fb(4,2)? function fa(x, y){ if (y == 0) return 0; return (x + fa(x, y-1)); } function fb(x, y) { if (y == 0) return 1; return fa(x, fb(x, y-1)); }

Question 4 (1 point)

image text in transcribed

Given the following 2 functions - what is the value of calling fb(3,3)? function fa(x, y){ if (y == 0) return 0; return (x + fa(x, y-1)); } function fb(x, y) { if (y == 0) return 1; return fa(x, fb(x, y-1)); }

Question 4 options:

Question 5 (1 point)

image text in transcribed

What is the value of f5(3,5,6) for the following function; function f5(n, a, b){ if (n

Question 5 options:

Question 6 (1 point)

image text in transcribed

What is the return value of f2(25) ? function f2(n) { if (n == 0) return ""; return n % 2 + " " + f2(parseInt(n/2)); }

Question 6 options:

1)

1 1 0 0 1

2)

1 0 0 1 1

3)

1 1 1 0 1

4)

1 0 1 1 1

5)

1 0 0 0 1

6)

1 1 1 1 1

Question 7 (1 point)

image text in transcribed

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 7 options:

Question 8 (1 point)

image text in transcribed

What is the output of the following function with the input "( ( ( ) )" function g(s) { var a = s.split(""); var b = []; for (var i = 0; i 0) b.pop();} } return b.length; }

Question 8 options:

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What is Centrifugation?

Answered: 1 week ago

Question

To find integral of ?a 2 - x 2

Answered: 1 week ago

Question

To find integral of e 3x sin4x

Answered: 1 week ago

Question

To find the integral of 3x/(x - 1)(x - 2)(x - 3)

Answered: 1 week ago

Question

What are Fatty acids?

Answered: 1 week ago