OSI Digital Interview Question

Data structures, few code snippets