UDig interview question

Very Difficult