32
Awesome Team
Mykhailo Ohorodnikov
https://ogoro.me
Last seen 1 year ago
Member for 3 years, 8 months, 29 days
Difficulty Normal
Python developer with telecom background - Kyiv, Ukraine
thank you for the idea - passing lambda in function parameters)
More
Solution consists of:
Clear determinant calculation for main matrix and matrices with replaced rows
Clear EGCD: https://en.wikipedia.org/wiki/Extended_Euclidean_algorithm#Example
Mysterious IDM from solution by [martin_b](https://py.checkio.org/mission/hubspot-amulet/publications/martin_b/python-
More
Version with recursive BFS:
https://py.checkio.org/mission/88th-puzzle/publications/ogoro/python-3/recursive-bfs-for-else/
:)
More
Version with BFS queue:
https://py.checkio.org/mission/88th-puzzle/publications/ogoro/python-3/bfs-queue-for-else/
:)
More
it is possible to save up to 1 level of BFS - by moving 'current_state == GOAL' check before appending to the queue)
More
thank you for great for optimization idea - to rotate only circles where marbles do not match with goal)
More
thank you for a nice and readable solution)
you could replace:
any([x.isdigit() for x in password])
with:
any(x.isdigit() for x in password)
it checks generator expression directly - and does not occupy memory with a list)
More
also used this great formula!
but with starmap)
https://py.checkio.org/mission/area-of-a-convex-polygon/publications/ogoro/python-3/shoelace/
More
which led to dictionary of transform functions:
https://py.checkio.org/mission/roll-the-cube/publications/ogoro/python-3/transforms/
)
More
which led to more compact:
https://py.checkio.org/mission/hacker-language/publications/ogoro/python-3/scanner-with-code-dictionary/
with lambda transcode dictionaries)
More
so many great ideas:
1. right shift for rank rotation))
1. max with walrus)
1. class methods for distance calculation and order mapping
thank you!)
More
initial version:
https://py.checkio.org/mission/hacker-language/publications/ogoro/python-3/scanner/
)
More
you could use:
len(i for i in password if i.isdigit())
or:
len(i.isdigit() for i in password)
or even:
len_pass > len(i.isdigit() for i in password) >= 1
)
More