1/13
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Infix String → Postfix String
A*B/C-D+E
AB*C/D-E+
Infix String → Postfix String
(A+B)/C*D
AB+C/D*
Postfix String → Infix String
AB*C/D-E+
A*B/C-D+E
Postfix String → Infix String
AB+C/D*
A+B/C*D
Infix String → Prefix String
(A+B)/C*D
/+*ABCD
Prefix String → Infix String
-*+ABCD
(A+B)*C-D
Algorithm fun1(x<integer>) |
if(x<5) |
return (3*x) |
else |
return (2 * fun1(x-5)+7) |
end if |
end fun1 |
a. fun1(4)
12
Algorithm fun1(x<integer>) |
if(x<5) |
return (3*x) |
else |
return (2 * fun1(x-5)+7) |
end if |
end fun1 |
b. fun1(10)
21
Algorithm fun1(x<integer>) |
if(x<5) |
return (3*x) |
else |
return (2 * fun1(x-5)+7) |
end if |
end fun1 |
c. fun1(12)
45
Algorithm fun3(x<integer>, y<integer>) |
if(x>y) |
return -1 |
else if (x equal y) |
return 1 |
else if (x equal y) |
return (x*fun3(x+1,y)) |
end if |
end fun3 |
a. fun3(10,4)
-1
Algorithm fun3(x<integer>, y<integer>) |
if(x>y) |
return -1 |
else if (x equal y) |
return 1 |
else if (x equal y) |
return (x*fun3(x+1,y)) |
end if |
end fun3 |
b. fun3(4,3)
-1
Algorithm fun3(x<integer>, y<integer>) |
if(x>y) |
return -1 |
else if (x equal y) |
return 1 |
else if (x equal y) |
return (x*fun3(x+1,y)) |
end if |
end fun3 |
c. fun3(4,7)
120
Algorithm fun3(x<integer>, y<integer>) |
if(x>y) |
return -1 |
else if (x equal y) |
return 1 |
else if (x equal y) |
return (x*fun3(x+1,y)) |
end if |
end fun3 |
d. fun3(0,0)
1