What is the left-child, right-sibling representation of a tree? Why would you use it?

The left-child, right-sibling representation (LCRS) is a way of encoding a multi-way tree (a tree structure in which each node can have any number of children) using a binary tree (a tree structure in which each node can have at most two children). Motivation To motivate how this representation works, let’s begin by considering a … Read more

Efficient (and well explained) implementation of a Quadtree for 2D collision detection [closed]

Efficient Quadtrees All right, I’ll take a shot at this. First a teaser to show the results of what I’ll propose involving 20,000 agents (just something I whipped up real quick for this specific question): The GIF has extremely reduced frame rate and significantly lower res to fit the 2 MB maximum for this site. … Read more