HashedIn by Deloitte interview question

time complexity ,loops and algorithms