---
title: "V K (@doncorleone) | Hashnode"
description: "V K (@doncorleone) writes on Hashnode. Read their latest articles and follow their work."
url: "https://hashnode.com/@doncorleone"
---

@doncorleone

# V K

@doncorleone · Joined October 2023

## Comments

[percolateDown function is exactly same as heappop. This won't create a heap of out an array. If the initial array is \[3,5,4,10,2,1\]. After percolateDown's execution array will be \[3,2,1,10,5,4\] which is still not a heap. Edit: for some one looking at it in future. In heapify function, instead of running from first node to last. It should run from last to first so (let i = last;i>=0;i--)](https://hashnode.com/posts/heaps-in-javascript/617fef0ff597ba4a82795f31/comment/651ef0f37e37d3b346c61f0e)

Comment · Article · Oct 5, 2023 · [Heaps in JavaScript](https://hashnode.com/posts/heaps-in-javascript/617fef0ff597ba4a82795f31)
