strlst 5da59ecb46 missing comments | 5 years ago | |
---|---|---|
benchmarks | 5 years ago | |
src | 5 years ago | |
.gitignore | 5 years ago | |
Makefile | 5 years ago | |
README.md | 5 years ago | |
benchmark | 5 years ago |
inspired by a certain entrance exam, a diff engine to figure leading sequence numbers dynamically
make
make install
usage: sdiffengine [-vb] [-f file] [-n continuation]
-f ... reads from stdin if not specified
-n ... total n desired sequence numbers
set to 1 if not specified
-b ... verbose output
-v ... print version
0 1 2 3 4 5 6
=> 0 1 2 3 4 5 6 7
correctly recognizes the pattern
1 2 6 24
=> 1 2 6 24 120
correctly recognizes the pattern
1 7 19 37
=> 1 7 19 37 61
correctly recognizes the pattern
2 4 2 4 2 4
=> 2 4 2 4 2 4 2
correctly recognizes the pattern
1 420 69 5555 9001
=> no solution
correctly recognizes no pattern
the puzzle sequences on fibonicci were fun, but I find myself pondering how many of them have a solution that can be found using this primitive approach
stat | res |
---|---|
correct | 7 |
incorrect | 1 |
total | 8 |
stat | res |
---|---|
correct | 8 |
incorrect | 13 |
total | 21 |
stat | res |
---|---|
correct | 10 |
incorrect | 3 |
total | 13 |