Varaint 1 of 16.1

#1

Elements of programming Interviews - Java

Problem 16.1- Count the number of score combinations

Variant 1 - Solve the same problem using O(s) space

How do you reduce space of the Cache? Any Ideas?

0 Likes

#2

Examine the way you use the contents of the cache in your code. At each step, when computing the cache, do you really need ALL the previous rows and columns? Is there some way to limit what’s kept in the cache to just what’s needed?

0 Likes

#3

lgout, are you sure it is O(s) but not O(n) space? If yes, can you provide more details, please?

0 Likes