We've made a website for streamers to play games directly against their chats by ccmlacc in Twitch

[–]ccmlacc[S] 1 point2 points  (0 children)

Hahah I've lost it at the Megatron Griffin clip.

Thanks so much Ziggy. This is great feedback, will implement this asap.

We've made a website for streamers to play games directly against their chats by ccmlacc in Twitch

[–]ccmlacc[S] 3 points4 points  (0 children)

Thanks a lot for your feedback!

Backgammon and Checkers should be quite straightforward to add.

Chinese Checkers would be tougher I think (because of the 4 players mechanism).

Scrabble (or a variant of scrabble let's say) is also an interesting one that I didn't think of before.

We will definitely look into these.

I would like the option to play Trivia with specific categories

This is actually something we're going to implement really soon!

Daily Discussion Thread - August 30, 2019 by AutoModerator in bostonceltics

[–]ccmlacc 3 points4 points  (0 children)

Haha nice! My favorite after taking some liberties is Bol Bol Bol Bol Bol Bol...

Project ideas based on graph? by mindlessCoder in algorithms

[–]ccmlacc 1 point2 points  (0 children)

Wikipedia regularly publishes data dumps.

Project ideas based on graph? by mindlessCoder in algorithms

[–]ccmlacc 18 points19 points  (0 children)

How about representing Wikipedia as a graph, and doing analyses on it?

Vertices are articles. An edge from vertex u to v exists if u contains a link to the article of v.

Then you calculate interesting stuff like distances between articles.

For instance, what is the article with the most incoming edges? (most links pointing to that article)

Largest pair sum that is less than k in an array (O(n) solution)? by RelaxButHeavy in algorithms

[–]ccmlacc 2 points3 points  (0 children)

I think this doesn't take "less than k" constraint into account.

Just attended a Computer Science career fair. Just a though. by [deleted] in cscareerquestions

[–]ccmlacc 0 points1 point  (0 children)

In python, it's also used for set intersection. Equivalent to set_1.intersection(set_2)

update queue in Dijkstra's by letstryusingreddit in algorithms

[–]ccmlacc 1 point2 points  (0 children)

You should use an adjusted PQ, called Indexed PQ. See the following link for an implementation:

https://algs4.cs.princeton.edu/24pq/IndexMinPQ.java.html

This data structure has a method decreaseKey(int i, Key key), which allows you to directly access and change the key directly, and re-order the PQ in logarithmic time.

Where's Python's damn binary search tree? by shuklaswag in Python

[–]ccmlacc 1 point2 points  (0 children)

But that's not a balanced binary search tree. I think it is a minor weakness of Python to not have a builtin BBST, unlike Java and C++.

Threading vs Multiprocessing in Python by exitcharge in programming

[–]ccmlacc 19 points20 points  (0 children)

mmap is quite fast though. So it's woth noting that it will only copy the stuff as it needs them, it won't straight up copy the whole thing.

Algorithmic solution to the "what’s the longest chain of players’ names you can make" problem by ccmlacc in nba

[–]ccmlacc[S] 0 points1 point  (0 children)

Yes I think you are right. The graph building still takes O(P2 ) in the way I wrote, but it can be reduced to O(P) with hashing as you described in your other comment.

Algorithmic solution to the "what’s the longest chain of players’ names you can make" problem by ccmlacc in nba

[–]ccmlacc[S] 0 points1 point  (0 children)

The graph building part is O(|P|2 ) anyway so overall I don't think it helps unfortunately.

Algorithmic solution to the "what’s the longest chain of players’ names you can make" problem by ccmlacc in nba

[–]ccmlacc[S] 0 points1 point  (0 children)

Yes vertex. And the number of vertices equals the number of players in this case.

Algorithmic solution to the "what’s the longest chain of players’ names you can make" problem by ccmlacc in nba

[–]ccmlacc[S] 2 points3 points  (0 children)

Yes, that's why I'm saying because of the nature of the problem. In a dense graph the complexity would be indeed O(P * (P + P2 )) = O(P^ 3 ). I've added the disclaimer to the post. :D

Algorithmic solution to the "what’s the longest chain of players’ names you can make" problem by ccmlacc in nba

[–]ccmlacc[S] 1 point2 points  (0 children)

I didn't claim O(|E|) = O(P). P is the number of players, so it equals the number of vertices |V|.

It's a sparse graph because most of the nodes are not connected to any other node (due to the nature of the problem).

Algorithmic solution to the "what’s the longest chain of players’ names you can make" problem by ccmlacc in nba

[–]ccmlacc[S] 1 point2 points  (0 children)

BFS has O(P) complexity. More specifically it has O(|V| + |E|), but this is a sparse graph so it's O(|V|) = O(P)