Chegg interview question

Technical mostly