Implemented three different heuristics