Genesys Interview Question

data structures, time complexity