Advotics Interview Question

Algorithm and data structure. ERD