AnalytixLabs Interview Question

Some programming questions on R A case study is given to solve