Look into replacing the singly-linked lists with either dynamic arrays or recursively allocated types.
Look into replacing the singly-linked lists with either dynamic arrays or recursively allocated types.