There's an error in the remove function. The index of the last element in the presence map hasn't been updated. Between line 40 and 41 add: presence[items[items.length -1]] = index
@CodePulse3 жыл бұрын
Thanks! I take it that it was you who edited the code on stackexchange? Anyway, I accepted that edit but also added + 1 to the index (since the presence value = index + 1). presence[items[items.length -1]] = index + 1
@julesl20873 жыл бұрын
@@CodePulse oops ! Good catch ! Yeah that was me :)
@camsdonostudios76623 жыл бұрын
When is the next OS episode??
@hdfsyu3 жыл бұрын
my heart is pulsing for the part 3 in OS series oh and what are you gonna do in part 3? (please do a mouse or gui or turning the os into command line tutorial please) EDIT: I have grown a family and learned a new language already why is the fixes taking so long? Part #3 should take a longgggg time not the fixes (and yes I am impatient sorry bout that) EDIT 2: ITS BEEN 3 WEEKS WHY WHY WHY WHY WHY WHY MAKE THE FIXES ALRIGHT ITS BEEN A MONTH GIVE THE FIXES NOW I WILL LEGIT KILL U IF U DON'T
@MadlipzMarathi3 жыл бұрын
Wouldn't BST or AVL tree more efficient than array
@CodePulse2 жыл бұрын
I doubt it. I don't think you can get more performant than arrays.
@ConsequenceCode3 жыл бұрын
Cool vid I was first
@fluxx28753 жыл бұрын
Interesting video, BUT Cryptocurrencies are damn bad for the environment 🤷🏼♂️
@CodePulse2 жыл бұрын
They do waist a lot of electricity, yes, but existing financial systems consume a lot of energy as well. Also, many blockchains, such as Ethereum, are moving to proof of stake which effectively has zero energy waist. Also, there's an argument that Bitcoin miners often use renewable energy or energy that was going to be put to waste anyways (although I'm not sure how true that statement is). kzbin.info/www/bejne/eprHcqqujMZ3gas