Every programmer should spend time building all the fundamental data structures from scratch (dynamically resizable array, hashmap, linked list) Actually learning how they work and the specific implementation tricks is 10x more valuable than just knowing their Big O complexity
Every programmer should spend time building all the fundamental data structures from scratch (dynamically resizable array, hashmap, linked list) Actually learning how they work and the specific implementation tricks is 10x more valuable than just knowing their Big O complexity
I recommend doing this in C (or in Zig, or even Rust but with unsafe) because actually managing memory plays a role in how these data structures are designed
@zack_overflow That’s literally what they teach in intro to CS classes?
@zack_overflow Big O complexity means little w/o knowing the hardware "See it's O(log n) but still runs slow because it trashes the cache at every step compared to this dumb array" But then the data set changes, and that rule changes :)
@zack_overflow They make you do this in college (lol)
@zack_overflow tsoding daily is one of the goated channels I have ever seen
Totally agree! When you implement these data structures yourself, you start noticing all these subtle edge cases and performance tradeoffs you'd miss by just memorizing Big O. Like, a hashmap's not just "O(1) lookup" - there's this whole world of load factors, collision handling, and rehashing that becomes super clear once you've coded one up. Plus it's kinda fun watching your own ArrayList grow and realizing "oh THAT'S why we double the capacity instead of adding a fixed amount" 😄
@zack_overflow Then try the same in Rust and curse the borrow checker until giving into Arc<Mut 😂
@zack_overflow learn them from the GOAT: youtube.com/@mycodeschool
@zack_overflow Except you should never use a dynamically resizable array, hashmap, or linked list. These are banned in my codebases. Learn static arrays, pools, and spsc ring buffer queues. Learn AoSoA and SoA. These are your fundamental data structures if you want good real-time performance.
@zack_overflow 100%. like actually implementing a hashmap and realizing why collision handling matters or how resizing works under the hood. no black boxes. eventhough that mostly you'll never write your own DS in production, the mental model you build through this is what matters.
@zack_overflow Yeah dude that’s what Comp Sci degrees are for
@zack_overflow true, but it sucks that during interview you are asked to tokenize a string and then apply some rules or the tokens in 20 mins, doing it from scratch hurts and FANG companies is full of stupid indians or chinese that only care about leetcode problems and you simply cannot finish
@zack_overflow Pretty sure this is done in every CS program across America already
@zack_overflow It's also just nice to have your own library which contains only what you need.
@zack_overflow Had to do it in C++ during CS undergrad. Shit I remember I had to do it on a whiteboard on the fly as the professor asked random questions. Crazy part was he played mind games. If you weren’t confident in your answer he’d say you’re wrong.. even if you got it right lol
@zack_overflow Legendary more is coding a judy array without any reference.
@zack_overflow This is so true, and watching @tsoding type code and explain at the same time is just chefs kiss
Absolutely agreed. Many developers stop at O(1) or O(log n) and forget the hidden costs. For example: - Hashmaps: collision handling, probing, and cache misses can make performance unpredictable. - Dynamic arrays: reallocations when array runs out of space, pointer invalidation can kill performance in latency-sensitive environments.
@zack_overflow I highly recommend the book Algorithms, by Robert Sedgewick, along with his course on Coursera. It's the same course he teaches at Stanford. It's really fantastic.
@zack_overflow Disagree. Knowing advanced data structures is nice, but I can’t recall when I would have needed something other than basic array or hashmap. Better spend your time learning things that will actually benefit you in daily work.
@zack_overflow Everyone knows Big O. Nobody knows how to use it.
@zack_overflow Every programmer should write 2d collision detection, a language parser for a text based adventure game, a Mandelbrot set generating shader, a JavaScript package manager and Lisp interpreter. Use whatever data structures someone else coded.
How many devs can read this, understand it and implement it? I the late 90s and early 00s is this was propritatary bleed edge to solve lock contention in large shared datasets being read and written to in multithreaded backends. Take IIS is a example. IIS was and probably still is (haven't looked in awhile) heavily dependant on this solution. georgevreilly.com/content/LKRhas…
@zack_overflow We did this in college and am quite grateful about that
@zack_overflow after that switch to powerasm or asm8086/88 and do it again "from metal scratch" x.com/mlsprwr/status…
@zack_overflow after that switch to powerasm or asm8086/88 and do it again "from metal scratch" x.com/mlsprwr/status…
@zack_overflow yes please, build them you learn the guts not just labels
She said she'd never date a bald guy.. Here's what i did next..