Sample code and exercise solutions for CS 165 THR and WFR