Harris Computer interview question

Coding problem with Context API structure