browse/
3 results
languages/javascript-s-event-loop-why-settimeout-0-runs-after-the-code-below-it.md
JavaScript's event loop: why setTimeout(…, 0) runs after the code below it
Why does `setTimeout(fn, 0)` run after the lines below it, and why does a promise callback beat it? JavaScript has one worker and two…
computer-science/stacks-and-queues-why-undo-takes-the-newest-item-and-a-printer-takes-t.md
Stacks and queues: why undo takes the newest item and a printer takes the oldest
Press undo and the last thing you typed disappears first. Send documents to a shared printer and the first one is printed first. Both are…
computer-science/breadth-first-search-how-a-maze-solver-finds-the-shortest-way-out.md
Breadth-first search: how a maze solver finds the shortest way out
How does a maze solver, or a map app, find the shortest route and not just any route? The answer is breadth-first search: explore every…