Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@ilechuks73 No reason to feel dumb. I’m just implementing different data structures in JavaScript. Nothing exciting, fancy, or even particularly interesting.
-
Heaps/heapsort is probably my favourite data structure/sorting algorithm combination. It's just so satisfying.
-
@RememberMe It took me way too long to understand why Floyd’s Heap Construction works. I could figure out why you end at position 1, but couldn’t figure out why in the hell you start from the size of the array integer divided by two. So.... drew different sized trees to try to figure out the pattern. Felt like a fucking idiot when the answer was “ah, it is the index of the last parent node”.
Related Rants
Just thought I'd share what I've been working on lately.
Heap: https://repl.it/@AmyShackles/Heap/...
Array: https://repl.it/@AmyShackles/...
Binary Tree: https://repl.it/@AmyShackles/...
(I'm so freaking tired.)
rant
heap
binary tree
data structures
node
mocha
array
javascript