implemented array structured heap