What algorithms do you know, and how do you learn new things?
Model learning as a directed prerequisite graph. Implement learning_order(algorithms, prerequisites) to return an order in which every algorithm appears after all of its prerequisites, or an empty array if no valid order exists.
algorithms is an array of distinct strings. Each prerequisite is a pair [prerequisite, algorithm].
def learning_order(algorithms, prerequisites):