Implement hashset and minheap