Shortest paths with negative weights
Assume a graph where no negative cycle is reachable from the source. Bellman-Ford repeats its pass over all the edges |V| − 1 times. Why are that many passes sufficient?
Tries and suffix trees
Assume that we have a prefix trie that stores N words over a fixed alphabet, and that moving to a child node in the trie costs constant time. What is the WORST-CASE time to decide whether a pattern of length M is one of the stored words?