What if you had to invent a dynamic array?

preview_player
Показать описание
In this video, we explore how we might create arguably the most used data structure in the world: the dynamic array (also know as the array list).

Рекомендации по теме
Комментарии
Автор

Choose your weapon:
std::vector
VS
Pointer to pointer that points to array of the pointers

Gameplayer
Автор

1960's dev: I need a dynamic array - builds linked list
1980's dev: I need a dynamic array - allocates a ton of memory and hopes he never over runs the buffer
2020's dev: I need a dynamic array - declares a variable of dynamic array type

th_CAV_Trooper
Автор

I've already written my own dynamic array, but I still clicked for some reason. Glad I did though, great video!

CalebTerryRED
Автор

I learned c, literally the first thing I asked myself was how do I make a dynamic array. The answer as always when it comes to c is pointers.

ImperialFool
Автор

Great video! The style reminds me a lot of 3 blue 1 brown

ryanyanko
Автор

Very nice videos. You could add that the constraint of fixed length array is often due to memory allocation : the program asks for "m bytes", and use that for the array. If we end up with needing more space, in general the memory "just after" the one we use for the current array is not available (thus we can not just extend the array). We need to ask for ">m" contiguous memory, and use that for our new array, and we have to copy the elements of the previous array into this new one before we can add the new element into it.

olivierdulac
Автор

The fact this video came on my recommended the day after a CS test on linked lists is mysterious timing indeed

redhawkneofeatherman
Автор

This is a fantastic video. Thank you for all of your hard work in putting things together so that other people can learn something new.

lye-ov
Автор

Love this! and really appreciate you sharing your github

dnagal
Автор

Gotta be honest, I did not expect this to end up going into big O notation 😂. Awesome video

cameronball
Автор

Reminds me of the time I actually did this - in C, for a two-dimensional array. The purpose of was to reconstruct a continuous image from translating video, for use in restoring scrolling text in old silent movies.

vylbird
Автор

Great video! Such a simple problem, yet it introduces many concepts of computer science. Thanks

pedroth
Автор

Awesome video!! Keep it up :)) I'm certain you're gonna grow

MikkMakk
Автор

This type of channel is exactly what I have been working for

mattstockwell
Автор

This was an assignment I had to do back in my intro to programming class, this video would have helped back then

pro_myth_eus
Автор

Never utilized my time better than this.. Loved this video...Pls share more videos...deepest gratitude to you

sathishraj
Автор

Hey, why video so short? :)

I have expected speech about multiplying array by 2 or exponent. Or about linked lists. Or about trees and hash tables.
In hash table you have O(1) write and access time.

It would be amazing to cover this subject completely

slentssh
Автор

This deserves way more views. Explains the concept of an array and gives an example of what Big O for runtime is like! ✌

AkiratheWhite
Автор

I have no idea why I was reccomended this, but I clicked anyways.

I hate math lessons, but those little illustrations you used made this too adorable to hate.

Congratulations, sir, you made me watch a math lesson out of my own volition.

PearangeProductions
Автор

yup, i've done the create new array version, next time i'll use stackoverflow and don't write it myself

kenzostaelens
visit shbcf.ru