HyperVerge interview question

Questions from online coding round which was easy-medium