OSI Digital interview question

Data structures, few code snippets