by qwerty456127 · 7y ago · 0 comments
Quick example of the "look and say" problem:
def look_and_say(n: int) -> str:
s = '1'
for _ in range(n - 1):
s = ''.join(
str(len(list(group))) + key
for key, group in groupby(s))
return sThat said, I think this might be what you're looking for: https://cs.uwaterloo.ca/~plragde/flaneries/FDS/
But there are to be the ways functional programmers solve the same task?
Thank you for the link.
In this book the author shows brute force, improved and functional implementations in python, c and haskell.
[1] http://www.parallel-algorithms-book.com [2] http://www.cs.cmu.edu/~15210