SentinelOne Interview Question

Time complexity discussions on the above problems