Implementation of Iterator, null object, decorator and strategy patterns for min - max heap