-
Notifications
You must be signed in to change notification settings - Fork 2
anti11
bradendubois edited this page Nov 8, 2021
·
9 revisions
ID: anti11
Difficulty: 3.2
CPU Time: 1 second
Memory: 1024 MB
It might be a bit tricky to notice the pattern, but the number of eligible strings is actually the Fibonacci sequence, though the length n actually corresponds to the n+2th number. To meet the time limit though, when implementing a fibonacci function, you'll want to cache results to speed everything up or the recursion will be far too slow.