GlobalFoundries interview question

First round was programming round