mathstodon.xyz is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Mastodon instance for maths people. We have LaTeX rendering in the web interface!

Server stats:

2.8K
active users

Pozorvlak

Solution to @cassidoo's coding problem this week: github.com/pozorvlak/cassidoo/ I thought I had a neat recursive solution based on @dpiponi's code from last week but couldn't get it to work. Then I thought about it a bit more and came up with a nice O(n) solution 🙂

I'm also unreasonably pleased with the commit message 'Add comment explaining treatment of "aaaaaaaa".'

GitHubcassidoo/2024/04-15_unique_substr/unique_substr.py at master · pozorvlak/cassidooSolutions to @cassidoo's coding challenges. Contribute to pozorvlak/cassidoo development by creating an account on GitHub.

@pozorvlak @cassidoo This problem looks interesting. Too busy to work on it now but I can see two recursive divide-by-two approaches. Neither give great performance. But if you're interested in parallel or incremental computation then you'll get logarithmic running time.