HashedIn by Deloitte Interview Question

time complexity ,loops and algorithms