Summative Assesment #2 CSS131

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/13

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

14 Terms

1
New cards

Infix String → Postfix String
A*B/C-D+E

AB*C/D-E+

2
New cards

Infix String → Postfix String
(A+B)/C*D

AB+C/D*

3
New cards

Postfix String → Infix String
AB*C/D-E+

A*B/C-D+E

4
New cards

Postfix String → Infix String
AB+C/D*

A+B/C*D

5
New cards

Infix String → Prefix String
(A+B)/C*D

/+*ABCD

6
New cards

Prefix String → Infix String
-*+ABCD

(A+B)*C-D

7
New cards

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

8
New cards

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

9
New cards

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

10
New cards

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

11
New cards

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

12
New cards

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

13
New cards

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

14
New cards