In his sophomore year, Gates devised an algorithm for pancake sorting as a solution to one of a series of unsolved problems[38] presented in a combinatorics class by Harry Lewis, one of his professors. Gates's solution held the record as the fastest version for over thirty years;[38][39] its successor is faster by only one percent.[38] His solution was later formalized in a published paper in collaboration with Harvard computer scientist Christos Papadimitriou.[40]