I remember a problem on one of the first assignments was particularly tricky. The question was about s-t cuts in a graph. The hard part about this problem was that to solve it, it seemed we needed to efficiently keep track of all pairs minimum s-t cuts. We started discussing the problem in the afternoon, and though it took us a while, by about 5am we had designed a data structure to do just that. We realized you can maintain all the cuts in just one tree. It was perfect. We jokingly called the data structure the Reyzin-Srivastava tree.
I spent the remainder of the night writing up the assignment, describing this thing in detail, proud of our cleverness. About a week later, we got the graded assignments back. Mine had one note on it, next to that particular question of course. It said "Next time, just reference Gomory-Hu trees when you need to use them."
I learned a couple lessons from this. The first is that I should remember to do the required reading before starting the assignment (we used Vijay Vazirani's approximation algorithms textbook, which really is worth reading). Had I done the reading, I would have learned about Gomory-Hu trees and realized the question asked us to trivially apply them to some problem, instead of reinventing them. The second, and perhaps, more important lesson was that I had a shot at doing research, at inventing something new. Yes, these trees had been invented decades before, and yes, we'd been exposed to more data structures than Gomory and Hu had been in 1961. But somehow knowing that we figured out something on our own that wasn't trivial really helped our confidence as first year grad students, and as I've written before, confidence is quite important for research.