Completed code for Medium tutorial: Basic Data Structures in TypeScript