wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

time and space trade off

Total questions: 6

Worksheet time: 2mins

Name
Class
Date
1.

which if this is the variety of time and space trade off strategy?

a)

variable time decrease

b)

input enhancement

c)

restructuring input

d)

memory alllocation

2.

When do we need to consider sacrificing the memory space?

a)

when we need a faster result

b)

when memory is not a problem

c)

When we dont have a powerfull processor

d)

When building an algorithm for a game

3.

formula for d1 value in bad match table is d(i)=m-index- (a)  

4.

Boyer Moore-Horspool algorithm.. (choose correct statements)

a)

uses only 1 table

b)

shift by selecting maximum value between d1 and d2

c)

improves the complexity of Boyer Moore's algorithm

d)

match from left to right (off the pattern)

5.

Complexity of the brute force string matching algo is?

a)

O(mn)

b)

O(mn)

c)

O(m+n)

d)

O(n)

6.

Boyer Moore's Worse case complexity is____

a)

O(m+n)

b)

O(m/n)

c)

O(n)

d)

O(n-m)