UBS Interview Question

Asked about DSA questions on DP