Graphs were asked and topological sort in that.
Anonymous
I couldn't answer that question. I started by thinking of arrays and then reached to a graph solution. I could write the code once they told me what algo should be used here.
Check out your Company Bowl for anonymous work chats.