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
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed