3 votes
Accepted

Prove maximum score is achieved by being greedy

If $(t_0, t_1, …, t_{n-1})$ is the sequence of tokens played by your greedy solution, you can show by induction that for any $k\in \{0, …, n\}$, the sequence $(t_0, …, t_{k-1})$ is the sequence of $k$ ...
Nathaniel's user avatar
  • 15.5k
2 votes
Accepted

What is the Time Complexity of Least Topological Ordering?

Yes, the best complexity one can get for this problem is O(V*log(V) + E). Therefore, your approach is correct. Congrats :) From a practical standpoint, the average ...
Radu Andrei Vaida's user avatar
1 vote

Is this bayesian average calculation right?

There's nothing wrong with the formula. It's doing exactly what you told it to do. I suspect you might have a misunderstanding of how to apply the Bayesian average. By setting ...
D.W.'s user avatar
  • 159k

Only top scored, non community-wiki answers of a minimum length are eligible