Implemented hash and equality functions for storedSolution