Programming class assignment on graphs