UBS interview question

A leetcode medium done on Google sheets