UST Interview Question

Core concepts and a DSA problem