26
Last seen 1 year ago
Member for 3 years, 6 months, 27 days
Difficulty Normal
Applied Physics master student
I didn't know about super().__init__(). That looks useful, thanks for teaching me something :)
More
not the shortest solution, but well structured and readable, I award you 2 points
More
I didn't know it was possible to write classes so simply, without __init__(self) etc
More
I didn't know it was possible in so few lines, well done
Actually, why do you even have the line "trans = phrase" ? Looks like you could have done even fewer lines if you just used phrase
More
good job solving the problem, but this is an unnecessarily long solution, I suggest you check out some other solutions to learn from
More
I didn't know you could use j as imaginary unit like that, very nice
More
I mean yes regex does rule but you really don't need it to solve this exercise, it's actually faster and shorter without
More
I just think it's wrong to import gcd when the whole exercise is to compute the gcd. You basically skipped the exercise and went straight to the answer.
More
How does this lru_cache work? If I try to use it without arguments like that it gives me an error:
TypeError: Expected maxsize to be an integer or None
More
This method seemed inferior to just finding the locations of the '#' symbols, so I made a better solution with that:
https://py.checkio.org/mission/ground-for-the-house/publications/ddavidse/python-3/ground-for-the-house-improved/
More
I started out making a recursive solution. This worked nicely, but was far too slow for large pile sizes, because it does a lot of unnecessary work (calculating the same sequence of moves many times as well as calculating all variations of it that have the same outcome). Anyway, here it is:
def
More