N-ary trees in C

If you want to implement an N-ary tree of integers in C, the obvious way to represent each node is something like the following. struct t { int n; int numKids; struct t **kids; } Here kids is an array of kid pointers.  Here’s an example tree. This representation is a bit annoying because the … Continue reading N-ary trees in C