spoj 3934. Recaman’s Sequence | MRECAMAN

another mathematical sequence, the sequence should be precomputed. during the precomputation it is better to use a boolean array instead of a dict. to know about the size of boolean array first you have to make a solution using map and find the maximum value in the sequence in the range.(which will be your size of boolean array)

https://gist.github.com/556d3019d492cc3b8134

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s