Finding a min and a max can be done in linear time, as can generating a list with no duplicates and no gaps. And the algorithm can be adapted to work in constant space as well. Ask this person who did not care for your algorithm to explain the time complexity and space requirements of the solution that he or she considers better.
I suspect this is one of those exercises that is intended to demonstrate the flexibility of a hash, but the problem's specification yields itself better to a more specific, and more optimal algorithm.