adding alex's solutions to heaps and searching