Tagged: algorithms

2

The pain of poll(2)?

If you’re working on a multi-platform project which does network communication you will end up thinking about replacing select(2) with poll(2) sooner or later. The problem with select are well known. poll(2) removes the limitations of select(2) and improves speed and features. The problem is that poll(2) isn’t available on all platforms. This means you need a poll(2)-emulation or create wrappers around other similar poll()...

0

Left-Leaning Red-Black Trees

Red-Black Trees were originally designed by taking a 2-3-4 tree and unrolling the big nodes into a cluster of simpler binary tree nodes. The 2-3-4 node operations are mapped to binary tree operations. Now Robert Sedgewick presented a new tree called Left-Leaning Red-Black Tree. A Red-Black tree has a lot of cases you have to consider, especially if you delete a node. This makes the...