Update code for Exhaustive Search assignment 2