Data structure exercise