OKG interview question

Linear regression or simple leetcode data structure question.