38
Awesome Team
Stefan Pochmann
http://www.stefan-pochmann.info/
Last seen 2 hours ago
Member for 9 years, 1 month, 4 days
Difficulty Normal
Recent solutions I'm happy with (just starting/trying this):
[Words Order](https://py.checkio.org/mission/words-order/publications/StefanPochmann/python-3/short-dict-subsequence/share/5bbb2df54ec5a810d36d7f70ae7e92da/)
Dang it no markdown here?
First one is my simplification of agave’s, see [here](https://leetcode.com/problems/ugly-number-ii/discuss/69397/Sharing-very-simple-and-elegant-Python-solution-using-heap-with-explanation/71469).
More
Binary search. Takes almost no memory at all. Solved n=10^6 in 0.35 seconds and n=10^9 in 15 minutes on a 2.25 GHz CPU.
More
Solved n=10^6 in 0.07 seconds and n=10^9 in 120 seconds on a 2.25 GHz CPU (using 493 MB memory for 10^9).
The following version is my fastest, solved n=10^9 in 114 seconds, but it's more complicated and I don't like it much. It simulates the main deque with two lists.
```
from collections import de
More
Binary search. Takes almost no memory at all. Solved n=10^6 in 0.35 seconds and n=10^9 in 15 minutes on a 2.25 GHz CPU.
More
Solved n=10^6 in 0.07 seconds and n=10^9 in 120 seconds on a 2.25 GHz CPU (using 493 MB memory for 10^9).
The following version is my fastest, solved n=10^9 in 114 seconds, but it's more complicated and I don't like it much. It simulates the main deque with two lists.
```
from collections import de
More
Checked all solutions, didn't see anybody doing this. Even though quite a few people used the inefficient `a = a[:-1]`. Weird.
More
Very nice, and you inspired me to write a [min version](http://www.checkio.org/mission/gcd/publications/StefanPochmann/python-3/min-/) :-)
More
We should have a "Tardy" category for highly inefficient solutions like this :-P
More