Why doubling makes a dynamic array O(1) (and the realloc bug almost everyone writes)
If you have used std::vector or Python lists, you have used a dynamic array. In C you have to build it yourself, and two details decide whether it i…
Latest DevOps news from Tech News
If you have used std::vector or Python lists, you have used a dynamic array. In C you have to build it yourself, and two details decide whether it i…
Stacks and queues are two of the simplest data structures, and two of the most useful. They show up everywhere: undo history, parsing, graph travers…
LeetCode has started publishing problems numbered 4000 and above. At the time of writing this post, there are already 4055 problems. In this post, I…
If you've spent time on LeetCode or GeeksforGeeks, you've probably run into the classic "Rearrange Array Alternately" problem. The premise: given a…
There's a special kind of bug that only shows up after you've made your code "better." You swap in the data structure everyone agrees is more effici…
JavaScript ships with Array , Set , and Map — but nothing that keeps its elements sorted as you insert. If you've ever built a leaderboard, an order…
Week 7 was hash maps and two pointers — patterns that lean on Python's built-in dict , set , and list . Week 8 was different. This week I built the…
Lists, tuples, dicts, and sets look like four different things. Underneath, they share the same idea: they all implement a small set of protocols, a…
tar+zstd is very hard to beat. So I stopped trying to beat it as a byte compressor. Instead, I tried something else: compress the structure first, t…
Data is no longer treated as a byproduct of business operations and has become one of the most valuable organizational assets. Every interaction on…